import { Prisma } from '@prisma/client' ; import { company , address } from 'faker' ; import { prisma } from 'src/prisma' ; const createVenues = async ( ) : Promise < number [ ] > => { const venueIds = [ ] ; for ( let i = 0 ; i < 4 ; i ++ ) { const venueData = { name : company . companyName ( ) , city : address . city ( ) , region : address . state ( ) , postal_code : address . zipCode ( ) , country : address . country ( ) , street_address : Math . random ( ) > 0.5 ? address . streetAddress ( ) : undefined , } ; const venue = await prisma . venues . create ( { data : venueData } ) ; venueIds . push ( venue . id ) ; } return venueIds ; } ; export default createVenues ;