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;
