import { PrismaClient } from '@prisma/client';
const prisma = new PrismaClient();
async function main() {
const clientProfiles = [
{
companyName: '...',
registeredOffice: '...',
uniqueRegistrationCode: '...',
commercialRegisterNumber: '...',
billingEmails: ['..'],
contactDetails: {
create: [
{
contactPerson: 'J..',
contactEmail: '..',
contactPhone: '..',
},
{
contactPerson: '..',
contactEmail: '..',
contactPhone: '..',
},
],
},
},
{
companyName: '..',
registeredOffice: '..',
uniqueRegistrationCode: '..,
commercialRegisterNumber: '1.',
billingEmails: ['....', '..'],
contactDetails: {
create: [
{
contactPerson: '..n',
contactEmail: '...m',
contactPhone: '1...',
},
],
},
},
];
for (const clientProfile of clientProfiles) {
await prisma.clientProfile.create({
data: clientProfile,
});
}
...
import { PrismaClient } from '@prisma/client';
const prisma = new PrismaClient();
async function main() {
const clientProfiles = [
{
companyName: '...',
registeredOffice: '...',
uniqueRegistrationCode: '...',
commercialRegisterNumber: '...',
billingEmails: ['..'],
contactDetails: {
create: [
{
contactPerson: 'J..',
contactEmail: '..',
contactPhone: '..',
},
{
contactPerson: '..',
contactEmail: '..',
contactPhone: '..',
},
],
},
},
{
companyName: '..',
registeredOffice: '..',
uniqueRegistrationCode: '..,
commercialRegisterNumber: '1.',
billingEmails: ['....', '..'],
contactDetails: {
create: [
{
contactPerson: '..n',
contactEmail: '...m',
contactPhone: '1...',
},
],
},
},
];
for (const clientProfile of clientProfiles) {
await prisma.clientProfile.create({
data: clientProfile,
});
}
...