Initial commit: LACA parking management system
This commit is contained in:
23
backend/prisma/slot.ts
Normal file
23
backend/prisma/slot.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
|
||||
import { data as slots } from './dump/slot.json';
|
||||
async function main(prisma: PrismaClient) {
|
||||
console.log(`seed tenant data: ${slots}`);
|
||||
await prisma.slot.createMany({
|
||||
data: slots.map((e) => ({
|
||||
lat: e.lat,
|
||||
lng: e.lng,
|
||||
address: e.address,
|
||||
city: e.city,
|
||||
district: e.district,
|
||||
ward: e.ward,
|
||||
directions: e.directions,
|
||||
name: e.name,
|
||||
tenantId: e.tenantId,
|
||||
total: 5,
|
||||
empty: 0,
|
||||
})),
|
||||
});
|
||||
}
|
||||
|
||||
export default main;
|
||||
Reference in New Issue
Block a user