@creator.co/creatorco-prisma-client 1.0.35 → 1.0.36-alpha-953b543

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/schema.prisma CHANGED
@@ -1,7 +1,7 @@
1
1
  generator erd {
2
2
  provider = "prisma-erd-generator"
3
3
  includeRelationFromFields = true
4
- output = "../../docs/creatorco_erd.md"
4
+ output = "../../docs/creatorco_erd.md"
5
5
  }
6
6
 
7
7
  generator kysely {
@@ -28,24 +28,24 @@ datasource db {
28
28
  }
29
29
 
30
30
  model User {
31
- id Int @default(autoincrement()) @id
32
- role String
33
- email String? @unique
34
- password String?
35
- registered DateTime @default(now())
36
- lastLoginDate DateTime?
37
- firstName String?
38
- lastName String?
39
- phone String?
40
- phoneCode Int?
41
- phoneShort String?
42
- profilePicUrl String? @db.VarChar(2083)
43
- forgotPasswordKey String? @unique
44
- affiliateSlug String? @unique
45
- closed DateTime?
46
- closedReason String?
47
- usercomLastSynced DateTime? @default(now())
48
- extraData Json @default("{}")
31
+ id Int @id @default(autoincrement())
32
+ role String
33
+ email String? @unique
34
+ password String?
35
+ registered DateTime @default(now())
36
+ lastLoginDate DateTime?
37
+ firstName String?
38
+ lastName String?
39
+ phone String?
40
+ phoneCode Int?
41
+ phoneShort String?
42
+ profilePicUrl String? @db.VarChar(2083)
43
+ forgotPasswordKey String? @unique
44
+ affiliateSlug String? @unique
45
+ closed DateTime?
46
+ closedReason String?
47
+ usercomLastSynced DateTime? @default(now())
48
+ extraData Json @default("{}")
49
49
 
50
50
  referrerId Int?
51
51
 
@@ -70,10 +70,10 @@ model User {
70
70
  socialProfiles SocialProfile[]
71
71
  rakutenActivity RakutenActivity[]
72
72
  impactRadiusEvents ImpactRadiusEvent[]
73
+ // @@fulltext([firstName, lastName])
73
74
 
74
75
  @@index([phoneCode, phone])
75
76
  @@map("user")
76
- // @@fulltext([firstName, lastName])
77
77
  }
78
78
 
79
79
  model Log {
@@ -124,7 +124,7 @@ model InstagramProfile {
124
124
  engagement Float?
125
125
  lastUpdated DateTime?
126
126
 
127
- fullName String? @db.VarChar(1024)
127
+ fullName String? @db.VarChar(1024)
128
128
  isBusiness Boolean?
129
129
  isPrivate Boolean?
130
130
  isVerified Boolean?
@@ -294,9 +294,9 @@ model TwitterProfile {
294
294
  }
295
295
 
296
296
  model BrandUserProfile {
297
- id Int @id @default(autoincrement())
298
- userId Int
299
- brandId Int
297
+ id Int @id @default(autoincrement())
298
+ userId Int
299
+ brandId Int
300
300
  agencyPrivileges Boolean @default(false) @map("agency_privileges")
301
301
 
302
302
  user User @relation(fields: [userId], references: [id], onDelete: Cascade)
@@ -304,7 +304,6 @@ model BrandUserProfile {
304
304
 
305
305
  @@index([userId])
306
306
  @@index([brandId])
307
-
308
307
  @@map("branduserprofile")
309
308
  }
310
309
 
@@ -321,8 +320,8 @@ model Brand {
321
320
  affiliateCommission Float?
322
321
  extraData Json @default("{}")
323
322
 
324
- specialistId Int?
325
- dedicatedSpecialist User? @relation(fields: [specialistId], references: [id])
323
+ specialistId Int?
324
+ dedicatedSpecialist User? @relation(fields: [specialistId], references: [id])
326
325
  instagramProfile InstagramProfile?
327
326
  youtubeProfile YoutubeProfile?
328
327
  tiktokProfile TiktokProfile?
@@ -347,11 +346,11 @@ model Brand {
347
346
  productLists ProductList[]
348
347
 
349
348
  // for agencies
350
- parentBrandId Int?
351
- parentBrand Brand? @relation("ChildBrands", fields: [parentBrandId], references: [id])
352
- childBrands Brand[] @relation("ChildBrands")
349
+ parentBrandId Int?
350
+ parentBrand Brand? @relation("ChildBrands", fields: [parentBrandId], references: [id])
351
+ childBrands Brand[] @relation("ChildBrands")
353
352
  // generated (for search)
354
- searchName String? @default(dbgenerated())
353
+ searchName String? @default(dbgenerated())
355
354
 
356
355
  @@map("brand")
357
356
  }
@@ -393,13 +392,13 @@ model ReportCredits {
393
392
  }
394
393
 
395
394
  model BrandToImage {
396
- id Int @default(autoincrement()) @id
397
- brandId Int
398
- type String
395
+ id Int @id @default(autoincrement())
396
+ brandId Int
397
+ type String
399
398
 
400
- brand Brand @relation(fields: [brandId], references: [id], onDelete: Cascade)
399
+ brand Brand @relation(fields: [brandId], references: [id], onDelete: Cascade)
401
400
 
402
- sizes BrandImage[]
401
+ sizes BrandImage[]
403
402
 
404
403
  @@index([brandId])
405
404
  @@map("brandtoimage")
@@ -513,16 +512,16 @@ model Campaign {
513
512
  affiliateLinkPath String?
514
513
  metaData Json @default("{}")
515
514
 
516
- steps CampaignStep[]
517
- categories CampaignToCategory[]
518
- optIns OptIn[]
519
- images CampaignToImage[]
520
- variables Variable[]
521
- productLists CampaignToProductList[]
522
- countries CampaignToCountry[]
523
- campaignPins CampaignPin[]
524
- socialPosts SocialPost[]
525
- campaignInvites CampaignInvite[]
515
+ steps CampaignStep[]
516
+ categories CampaignToCategory[]
517
+ optIns OptIn[]
518
+ images CampaignToImage[]
519
+ variables Variable[]
520
+ productLists CampaignToProductList[]
521
+ countries CampaignToCountry[]
522
+ campaignPins CampaignPin[]
523
+ socialPosts SocialPost[]
524
+ campaignInvites CampaignInvite[]
526
525
  campaignToShopifyProducts CampaignToShopifyProduct[]
527
526
 
528
527
  brandId Int
@@ -547,7 +546,6 @@ model CampaignPin {
547
546
  campaign Campaign @relation(fields: [campaignId], references: [id], onDelete: Cascade)
548
547
 
549
548
  @@index([userId])
550
-
551
549
  @@map("campaignpin")
552
550
  }
553
551
 
@@ -586,16 +584,17 @@ model CampaignToCountry {
586
584
  }
587
585
 
588
586
  model ProductList {
589
- id Int @id @default(autoincrement())
587
+ id Int @id @default(autoincrement())
590
588
  title String
591
- description String? @db.Text
592
- metaData Json @default("{}")
589
+ description String? @db.Text
590
+ metaData Json @default("{}")
591
+ deactivated DateTime?
593
592
 
594
593
  brandId Int
595
594
 
596
595
  brand Brand @relation(fields: [brandId], references: [id], onDelete: Cascade)
597
596
 
598
- items ProductListItem[]
597
+ items ProductListItem[]
599
598
  campaignProductLists CampaignToProductList[]
600
599
 
601
600
  @@index([brandId])
@@ -603,24 +602,25 @@ model ProductList {
603
602
  }
604
603
 
605
604
  model ProductListItem {
606
- id Int @id @default(autoincrement())
605
+ id Int @id @default(autoincrement())
607
606
  title String
608
- description String? @db.Text
609
- metaData Json @default("{}")
607
+ description String? @db.Text
608
+ metaData Json @default("{}")
609
+ deactivated DateTime?
610
610
 
611
611
  productListId Int
612
- productList ProductList @relation(fields: [productListId], references: [id], onDelete: Cascade)
613
- optins OptinToProductListItem[]
612
+ productList ProductList @relation(fields: [productListId], references: [id], onDelete: Cascade)
613
+ optins OptinToProductListItem[]
614
614
 
615
615
  @@index([productListId])
616
616
  @@map("product_list_item")
617
617
  }
618
618
 
619
619
  model CampaignToProductList {
620
- campaignId Int
620
+ campaignId Int
621
621
  productListId Int
622
622
 
623
- campaign Campaign @relation(fields: [campaignId], references: [id], onDelete: Cascade)
623
+ campaign Campaign @relation(fields: [campaignId], references: [id], onDelete: Cascade)
624
624
  productList ProductList @relation(fields: [productListId], references: [id])
625
625
 
626
626
  @@id([campaignId, productListId])
@@ -629,10 +629,10 @@ model CampaignToProductList {
629
629
  }
630
630
 
631
631
  model OptinToProductListItem {
632
- optInId Int
632
+ optInId Int
633
633
  productListItemId Int
634
634
 
635
- optIn OptIn @relation(fields: [optInId], references: [id], onDelete: Cascade)
635
+ optIn OptIn @relation(fields: [optInId], references: [id], onDelete: Cascade)
636
636
  productListItem ProductListItem @relation(fields: [productListItemId], references: [id], onDelete: Cascade)
637
637
 
638
638
  @@id([optInId, productListItemId])
@@ -680,16 +680,16 @@ model Step {
680
680
  }
681
681
 
682
682
  model CampaignStep {
683
- id Int @default(autoincrement()) @id
684
- placement Int
685
- stepSettings Json?
686
- actionee String?
687
- instructions String? @db.Text
688
- customStepTitle String?
689
- customForm Json?
690
- metaData Json @default("{}")
691
- campaignId Int
692
- stepId Int?
683
+ id Int @id @default(autoincrement())
684
+ placement Int
685
+ stepSettings Json?
686
+ actionee String?
687
+ instructions String? @db.Text
688
+ customStepTitle String?
689
+ customForm Json?
690
+ metaData Json @default("{}")
691
+ campaignId Int
692
+ stepId Int?
693
693
 
694
694
  campaign Campaign @relation(fields: [campaignId], references: [id], onDelete: Cascade)
695
695
  step Step? @relation(fields: [stepId], references: [id])
@@ -698,7 +698,6 @@ model CampaignStep {
698
698
  optInSteps OptInStep[]
699
699
 
700
700
  @@index([campaignId])
701
-
702
701
  @@map("campaignstep")
703
702
  }
704
703
 
@@ -756,12 +755,12 @@ model OptIn {
756
755
  campaign Campaign @relation(fields: [campaignId], references: [id], onDelete: Cascade)
757
756
  currentStep CampaignStep? @relation(fields: [currentStepId], references: [id])
758
757
 
759
- variables OptInVariable[]
760
- optInSteps OptInStep[]
761
- chat Chat?
762
- campaignInvites CampaignInvite[]
763
- trolleyPayments TrolleyPayment[]
764
- affiliateClicks AffiliateClick[]
758
+ variables OptInVariable[]
759
+ optInSteps OptInStep[]
760
+ chat Chat?
761
+ campaignInvites CampaignInvite[]
762
+ trolleyPayments TrolleyPayment[]
763
+ affiliateClicks AffiliateClick[]
765
764
  productListItems OptinToProductListItem[]
766
765
 
767
766
  @@index([userId])
@@ -770,15 +769,15 @@ model OptIn {
770
769
  }
771
770
 
772
771
  model TrolleyPayment {
773
- id Int @id @default(autoincrement())
774
- paymentId String @unique
775
- type trolleyPaymentType?
776
- status trolleyPaymentStatus
777
- optInId Int?
778
- paymentAmount Int
779
- metaData Json @default("{}")
772
+ id Int @id @default(autoincrement())
773
+ paymentId String @unique
774
+ type trolleyPaymentType?
775
+ status trolleyPaymentStatus
776
+ optInId Int?
777
+ paymentAmount Int
778
+ metaData Json @default("{}")
780
779
 
781
- optIn OptIn? @relation(fields: [optInId], references:[id])
780
+ optIn OptIn? @relation(fields: [optInId], references: [id])
782
781
  }
783
782
 
784
783
  enum trolleyPaymentType {
@@ -811,7 +810,7 @@ model OptInVariable {
811
810
 
812
811
  model SocialPost {
813
812
  id Int @id @default(autoincrement())
814
- externalId String? @map("external_id")// TODO: This should be required once all of the posts have been updated
813
+ externalId String? @map("external_id") // TODO: This should be required once all of the posts have been updated
815
814
  phylloId String? @unique
816
815
  metaData Json @default("{}")
817
816
  data Json @default("{}") // DEPRECATED, USE metaData instead, seems to be an error when attempting to remove this field, proabably due to table size
@@ -854,12 +853,10 @@ model SocialPost {
854
853
  campaign Campaign? @relation(fields: [campaignId], references: [id])
855
854
  lists ListToSocialPost[]
856
855
 
856
+ @@unique([platform, externalId])
857
857
  @@index(campaignId)
858
858
  @@index(userId)
859
859
  @@index(posted)
860
-
861
- @@unique([platform, externalId])
862
-
863
860
  @@map("socialpost")
864
861
  }
865
862
 
@@ -918,12 +915,12 @@ model Image {
918
915
  }
919
916
 
920
917
  model BrandImage {
921
- id Int @default(autoincrement()) @id
922
- url String @db.VarChar(2083)
923
- size String
924
- brandImageId Int
918
+ id Int @id @default(autoincrement())
919
+ url String @db.VarChar(2083)
920
+ size String
921
+ brandImageId Int
925
922
 
926
- brandImage BrandToImage @relation(fields: [brandImageId], references: [id], onDelete: Cascade)
923
+ brandImage BrandToImage @relation(fields: [brandImageId], references: [id], onDelete: Cascade)
927
924
 
928
925
  @@index([brandImageId])
929
926
  @@map("brandimage")
@@ -1014,7 +1011,7 @@ model AffiliateClick {
1014
1011
 
1015
1012
  affiliateLinkId Int
1016
1013
 
1017
- optin OptIn @relation(fields: [optInId], references: [id])
1014
+ optin OptIn @relation(fields: [optInId], references: [id])
1018
1015
  affiliateLink AffiliateLink @relation(fields: [affiliateLinkId], references: [id])
1019
1016
  affiliateEvent AffiliateEvent[]
1020
1017
  }
@@ -1050,22 +1047,22 @@ model SavedFile {
1050
1047
  }
1051
1048
 
1052
1049
  model CampaignInvite {
1053
- id Int @default(autoincrement()) @id
1054
- socialProfileId Int?
1055
- brandId Int
1056
- campaignId Int?
1057
- optInId Int? @unique
1058
- code String? @unique
1059
- createdAt DateTime @default(now())
1060
- declineDate DateTime?
1061
- declineReason String? @db.Text
1062
-
1063
- metaData Json? @default("{}")
1064
-
1065
- brand Brand @relation(fields: [brandId], references: [id], onDelete: Cascade)
1066
- campaign Campaign? @relation(fields: [campaignId], references: [id])
1067
- socialProfile SocialProfile? @relation(fields: [socialProfileId], references: [id])
1068
- optIn OptIn? @relation(fields: [optInId], references: [id])
1050
+ id Int @id @default(autoincrement())
1051
+ socialProfileId Int?
1052
+ brandId Int
1053
+ campaignId Int?
1054
+ optInId Int? @unique
1055
+ code String? @unique
1056
+ createdAt DateTime @default(now())
1057
+ declineDate DateTime?
1058
+ declineReason String? @db.Text
1059
+
1060
+ metaData Json? @default("{}")
1061
+
1062
+ brand Brand @relation(fields: [brandId], references: [id], onDelete: Cascade)
1063
+ campaign Campaign? @relation(fields: [campaignId], references: [id])
1064
+ socialProfile SocialProfile? @relation(fields: [socialProfileId], references: [id])
1065
+ optIn OptIn? @relation(fields: [optInId], references: [id])
1069
1066
 
1070
1067
  @@index([socialProfileId])
1071
1068
  }
@@ -1084,7 +1081,7 @@ model CreatorList {
1084
1081
  campaign Campaign? @relation(fields: [campaignId], references: [id])
1085
1082
  sequences Sequence[]
1086
1083
 
1087
- @@index ([brandId])
1084
+ @@index([brandId])
1088
1085
  @@map("creatorlist")
1089
1086
  }
1090
1087
 
@@ -1134,9 +1131,9 @@ model SocialProfile {
1134
1131
  created DateTime @default(now())
1135
1132
  updated DateTime?
1136
1133
 
1137
- creatorListItems CreatorListItem[]
1138
- campaignInvites CampaignInvite[]
1139
- user User? @relation(fields: [userId], references: [id])
1134
+ creatorListItems CreatorListItem[]
1135
+ campaignInvites CampaignInvite[]
1136
+ user User? @relation(fields: [userId], references: [id])
1140
1137
 
1141
1138
  @@index(username)
1142
1139
  @@index(userId)
@@ -1156,16 +1153,16 @@ model MessageTemplate {
1156
1153
  }
1157
1154
 
1158
1155
  model EmailTemplate {
1159
- id Int @id @default(autoincrement())
1160
- label String?
1161
- subject String?
1162
- template String @db.Text
1163
- brandId Int?
1156
+ id Int @id @default(autoincrement())
1157
+ label String?
1158
+ subject String?
1159
+ template String @db.Text
1160
+ brandId Int?
1164
1161
 
1165
- brand Brand? @relation(fields: [brandId], references: [id])
1166
- metaData Json @default("{}") // to save any additional data such as user defined variables
1162
+ brand Brand? @relation(fields: [brandId], references: [id])
1163
+ metaData Json @default("{}") // to save any additional data such as user defined variables
1167
1164
 
1168
- sequenceSteps SequenceStep[]
1165
+ sequenceSteps SequenceStep[]
1169
1166
 
1170
1167
  @@index([brandId])
1171
1168
  }
@@ -1229,18 +1226,19 @@ model RakutenActivity {
1229
1226
 
1230
1227
  @@map("rakutenactivity")
1231
1228
  }
1229
+
1232
1230
  model ImpactRadiusEvent {
1233
- id Int @id @default(autoincrement())
1234
- type String // action/click
1235
- created DateTime @default(now())
1236
- amount Float?
1237
- commission Float?
1238
- metaData Json @default("{}")
1231
+ id Int @id @default(autoincrement())
1232
+ type String // action/click
1233
+ created DateTime @default(now())
1234
+ amount Float?
1235
+ commission Float?
1236
+ metaData Json @default("{}")
1239
1237
 
1240
- userId Int
1238
+ userId Int
1241
1239
  brandId Int?
1242
1240
 
1243
- user User @relation(fields: [userId], references: [id])
1241
+ user User @relation(fields: [userId], references: [id])
1244
1242
  brand Brand? @relation(fields: [brandId], references: [id])
1245
1243
  }
1246
1244
 
@@ -1251,28 +1249,29 @@ model CreatorSearchFilter {
1251
1249
  filters Json @default("{}")
1252
1250
  createdAt DateTime @default(now())
1253
1251
  updatedAt DateTime?
1254
- brand Brand @relation(fields: [brandId], references: [id], onDelete: Cascade)
1252
+ brand Brand @relation(fields: [brandId], references: [id], onDelete: Cascade)
1253
+
1255
1254
  @@map("creatorsearchfilter")
1256
1255
  }
1257
1256
 
1258
1257
  model Sequence {
1259
- id Int @id @default(autoincrement())
1260
- campaignId Int
1261
- creatorListId Int
1262
- title String @db.VarChar(255)
1263
- createdAt DateTime @default(now())
1264
- completed Boolean @default(false)
1265
- brandId Int
1266
- enabled Boolean @default(false)
1267
-
1268
- campaign Campaign @relation(fields: [campaignId], references: [id])
1269
- creatorList CreatorList @relation(fields: [creatorListId], references: [id])
1270
- brand Brand @relation(fields: [brandId], references: [id])
1271
-
1272
- steps SequenceStep[]
1273
- outboundEmails SequenceOutboundEmail[]
1274
- inboundEmails SequenceInboundEmail[]
1275
- imapCheckpoints SequenceImapCheckpoint[]
1258
+ id Int @id @default(autoincrement())
1259
+ campaignId Int
1260
+ creatorListId Int
1261
+ title String @db.VarChar(255)
1262
+ createdAt DateTime @default(now())
1263
+ completed Boolean @default(false)
1264
+ brandId Int
1265
+ enabled Boolean @default(false)
1266
+
1267
+ campaign Campaign @relation(fields: [campaignId], references: [id])
1268
+ creatorList CreatorList @relation(fields: [creatorListId], references: [id])
1269
+ brand Brand @relation(fields: [brandId], references: [id])
1270
+
1271
+ steps SequenceStep[]
1272
+ outboundEmails SequenceOutboundEmail[]
1273
+ inboundEmails SequenceInboundEmail[]
1274
+ imapCheckpoints SequenceImapCheckpoint[]
1276
1275
 
1277
1276
  @@map("sequence")
1278
1277
  }
@@ -1286,10 +1285,10 @@ model SequenceStep {
1286
1285
  order Int
1287
1286
  stepId Int
1288
1287
 
1289
- sequence Sequence @relation(fields: [sequenceId], references: [id], onDelete: Cascade)
1290
- emailTemplate EmailTemplate @relation(fields: [emailTemplateId], references: [id])
1288
+ sequence Sequence @relation(fields: [sequenceId], references: [id], onDelete: Cascade)
1289
+ emailTemplate EmailTemplate @relation(fields: [emailTemplateId], references: [id])
1291
1290
 
1292
- outboundEmails SequenceOutboundEmail[]
1291
+ outboundEmails SequenceOutboundEmail[]
1293
1292
 
1294
1293
  @@map("sequencestep")
1295
1294
  }
@@ -1301,9 +1300,9 @@ model SequenceOutboundEmail {
1301
1300
  sequenceStepId Int
1302
1301
  sentAt DateTime @default(now())
1303
1302
 
1304
- sequence Sequence @relation(fields: [sequenceId], references: [id])
1305
- creatorList CreatorListItem @relation(fields: [creatorListItemId], references: [id])
1306
- sequenceStep SequenceStep @relation(fields: [sequenceStepId], references: [id])
1303
+ sequence Sequence @relation(fields: [sequenceId], references: [id])
1304
+ creatorList CreatorListItem @relation(fields: [creatorListItemId], references: [id])
1305
+ sequenceStep SequenceStep @relation(fields: [sequenceStepId], references: [id])
1307
1306
 
1308
1307
  @@map("sequenceoutboundemail")
1309
1308
  }
@@ -1315,7 +1314,7 @@ model SequenceInboundEmail {
1315
1314
  receivedAt DateTime @default(now())
1316
1315
  msgHash String
1317
1316
 
1318
- sequence Sequence @relation(fields: [sequenceId], references: [id])
1317
+ sequence Sequence @relation(fields: [sequenceId], references: [id])
1319
1318
  creatorListId CreatorListItem @relation(fields: [creatorListItemId], references: [id])
1320
1319
 
1321
1320
  @@map("sequenceinboundemail")
@@ -1328,7 +1327,7 @@ model SequenceImapCheckpoint {
1328
1327
  createdAt DateTime @default(now())
1329
1328
  updatedAt DateTime @default(now())
1330
1329
 
1331
- sequence Sequence @relation(fields: [sequenceId], references: [id])
1330
+ sequence Sequence @relation(fields: [sequenceId], references: [id])
1332
1331
  creatorListId CreatorListItem @relation(fields: [creatorListItemId], references: [id])
1333
1332
 
1334
1333
  @@id([sequenceId, creatorListItemId])
@@ -1336,19 +1335,19 @@ model SequenceImapCheckpoint {
1336
1335
  }
1337
1336
 
1338
1337
  model ShopifyStore {
1339
- id Int @id @default(autoincrement())
1338
+ id Int @id @default(autoincrement())
1340
1339
  name String?
1341
1340
  url String
1342
- accessToken String? @map("access_token")
1341
+ accessToken String? @map("access_token")
1343
1342
  syncStatus ShopifyStoreSyncStatus @default(syncing) @map("sync_status")
1344
- lastSynced DateTime? @map("last_synced")
1345
- metaData Json @default("{}") @map("meta_data")
1343
+ lastSynced DateTime? @map("last_synced")
1344
+ metaData Json @default("{}") @map("meta_data")
1346
1345
 
1347
- brandId Int @map("brand_id")
1346
+ brandId Int @map("brand_id")
1348
1347
 
1349
- products ShopifyProduct[]
1348
+ products ShopifyProduct[]
1350
1349
 
1351
- brand Brand? @relation(fields: [brandId], references: [id], onDelete: Cascade)
1350
+ brand Brand? @relation(fields: [brandId], references: [id], onDelete: Cascade)
1352
1351
 
1353
1352
  @@index([brandId])
1354
1353
  @@map("shopify_store")
@@ -1361,18 +1360,18 @@ enum ShopifyStoreSyncStatus {
1361
1360
  }
1362
1361
 
1363
1362
  model ShopifyProduct {
1364
- id Int @id @default(autoincrement())
1365
- shopifyId String @unique @map("shopify_id")
1366
- title String
1367
- handle String
1368
- imageUrl String @db.Text @map("image_url")
1363
+ id Int @id @default(autoincrement())
1364
+ shopifyId String @unique @map("shopify_id")
1365
+ title String
1366
+ handle String
1367
+ imageUrl String @map("image_url") @db.Text
1369
1368
 
1370
- metaData Json @default("{}") @map("meta_data")
1369
+ metaData Json @default("{}") @map("meta_data")
1371
1370
 
1372
- shopifyStoreId Int @map("shopify_store_id")
1371
+ shopifyStoreId Int @map("shopify_store_id")
1373
1372
 
1374
- campaignToShopifyProducts CampaignToShopifyProduct[]
1375
- variations ShopifyProductVariation[]
1373
+ campaignToShopifyProducts CampaignToShopifyProduct[]
1374
+ variations ShopifyProductVariation[]
1376
1375
 
1377
1376
  shopifyStore ShopifyStore @relation(fields: [shopifyStoreId], references: [id], onDelete: Cascade)
1378
1377
 
@@ -1380,14 +1379,14 @@ model ShopifyProduct {
1380
1379
  }
1381
1380
 
1382
1381
  model ShopifyProductVariation {
1383
- id Int @id @default(autoincrement())
1384
- shopifyId String @unique @map("shopify_id")
1385
- title String
1386
- imageUrl String @db.Text @map("image_url")
1382
+ id Int @id @default(autoincrement())
1383
+ shopifyId String @unique @map("shopify_id")
1384
+ title String
1385
+ imageUrl String @map("image_url") @db.Text
1387
1386
 
1388
- metaData Json @default("{}") @map("meta_data")
1387
+ metaData Json @default("{}") @map("meta_data")
1389
1388
 
1390
- shopifyProductId Int @map("shopify_product_id")
1389
+ shopifyProductId Int @map("shopify_product_id")
1391
1390
 
1392
1391
  shopifyProduct ShopifyProduct @relation(fields: [shopifyProductId], references: [id], onDelete: Cascade)
1393
1392
 
@@ -1395,11 +1394,11 @@ model ShopifyProductVariation {
1395
1394
  }
1396
1395
 
1397
1396
  model CampaignToShopifyProduct {
1398
- campaignId Int @map("campaign_id")
1399
- shopifyProductId Int @map("shopify_product_id")
1397
+ campaignId Int @map("campaign_id")
1398
+ shopifyProductId Int @map("shopify_product_id")
1400
1399
 
1401
- campaign Campaign @relation(fields: [campaignId], references: [id], onDelete: Cascade)
1402
- shopifyProduct ShopifyProduct @relation(fields: [shopifyProductId], references: [id], onDelete: Cascade)
1400
+ campaign Campaign @relation(fields: [campaignId], references: [id], onDelete: Cascade)
1401
+ shopifyProduct ShopifyProduct @relation(fields: [shopifyProductId], references: [id], onDelete: Cascade)
1403
1402
 
1404
1403
  @@id([campaignId, shopifyProductId])
1405
1404
  @@map("campaign_to_shopify_product")