@@ -280,26 +280,6 @@ const userData: Prisma.UserCreateInput[] = [
280280 } ,
281281] ;
282282
283- const contractorData : Prisma . ContractorCreateInput [ ] = [
284- {
285- name : "Contractor 2 Name" ,
286- registrationId : "ABSDC123456" ,
287- registrationDate : "2024-05-10T00:00:00Z" ,
288- tinNumber : "34334" ,
289- contactNumber : "+929323" ,
290- workforceSize : 100 ,
291- paymentPerTon : 10.5 ,
292- requiredWastePerDay : 500.0 ,
293- contractDuration : "1 year" ,
294- area : "City XYZ" ,
295- assignedSTS : {
296- connect : {
297- id : "sts1" ,
298- } ,
299- } ,
300- } ,
301- ] ;
302-
303283const vehicleData : Prisma . VehicleCreateInput [ ] = [
304284 {
305285 id : "vid1" ,
@@ -550,6 +530,26 @@ const tripData: Prisma.TripCreateInput[] = [
550530 } ,
551531] ;
552532
533+ const contractorData : Prisma . ContractorCreateInput [ ] = [
534+ {
535+ name : "Contractor 2 Name" ,
536+ registrationId : "ABSDC123456" ,
537+ registrationDate : "2024-05-10T00:00:00Z" ,
538+ tinNumber : "34334" ,
539+ contactNumber : "+929323" ,
540+ workforceSize : 100 ,
541+ paymentPerTon : 10.5 ,
542+ requiredWastePerDay : 500.0 ,
543+ contractDuration : "1 year" ,
544+ area : "City XYZ" ,
545+ assignedSTS : {
546+ connect : {
547+ id : "sts1" ,
548+ } ,
549+ } ,
550+ } ,
551+ ] ;
552+
553553async function main ( ) {
554554 console . log ( "Seeding roles..." ) ;
555555 for ( const role of roleData ) {
@@ -599,14 +599,6 @@ async function main() {
599599 console . log ( newRoute ) ;
600600 }
601601
602- console . log ( "Seeding contractors..." ) ;
603- for ( const contractor of contractorData ) {
604- const newContractor = await prisma . contractor . create ( {
605- data : contractor ,
606- } ) ;
607- console . log ( newContractor ) ;
608- }
609-
610602 console . log ( "Seeding users..." ) ;
611603 for ( const user of userData ) {
612604 const newUser = await prisma . user . create ( {
@@ -655,6 +647,14 @@ async function main() {
655647 console . log ( newTrip ) ;
656648 }
657649
650+ console . log ( "Seeding contractors..." ) ;
651+ for ( const contractor of contractorData ) {
652+ const newContractor = await prisma . contractor . create ( {
653+ data : contractor ,
654+ } ) ;
655+ console . log ( newContractor ) ;
656+ }
657+
658658 console . log ( "Seeding completed!" ) ;
659659}
660660
0 commit comments