diff --git a/server/src/db/seeder.ts b/server/src/db/seeder.ts new file mode 100644 index 0000000000000000000000000000000000000000..df779ed066ee0e45126f14609af4b4e58fc917c3 --- /dev/null +++ b/server/src/db/seeder.ts @@ -0,0 +1,38 @@ +import Boat from "./models/Boat"; + +const seedBoatTable = async () => { + if ((await Boat.count()) < 1) { + await Boat.create({ + id: 1, + name: "boat one", + status: false, + active: true, + seats: 5, + }); + await Boat.create({ + id: 2, + name: "boat two", + status: false, + active: true, + seats: 4, + }); + await Boat.create({ + id: 3, + name: "boat three", + status: false, + active: false, + seats: 2, + }); + } +}; + +const seedCheckInTable = async () => {}; +const seedCustomerTable = async () => {}; + +const runSeeders = async () => { + await seedBoatTable(); + await seedCheckInTable(); + await seedCustomerTable(); +}; + +export default runSeeders;