@creator.co/creatorco-prisma-client 1.0.56 → 1.0.57-alpha-fe4a8b1

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/package.json CHANGED
@@ -79,7 +79,7 @@
79
79
  },
80
80
  "./*": "./*"
81
81
  },
82
- "version": "1.0.56",
82
+ "version": "1.0.57-alpha-fe4a8b1",
83
83
  "sideEffects": false,
84
84
  "description": "Prisma client for creatorco Database"
85
85
  }
package/schema.prisma CHANGED
@@ -50,31 +50,32 @@ model User {
50
50
 
51
51
  referrerId Int?
52
52
 
53
- referrer User? @relation("Referrals", fields: [referrerId], references: [id])
54
- referredUsers User[] @relation("Referrals")
55
- logs Log[]
56
- creatorProfile CreatorProfile?
57
- instagramProfile InstagramProfile?
58
- youtubeProfile YoutubeProfile?
59
- tiktokProfile TiktokProfile?
60
- facebookProfile FacebookProfile?
61
- twitterProfile TwitterProfile?
62
- twitchProfile TwitchProfile?
63
- brandProfiles BrandUserProfile[]
64
- optIns OptIn[]
65
- assignedBrands Brand[]
66
- messages Message[]
67
- socialPosts SocialPost[]
68
- paymentTransactions PaymentTransaction[]
69
- affiliateLinks AffiliateLink[]
70
- campaignPins CampaignPin[]
71
- socialProfiles SocialProfile[]
72
- rakutenActivity RakutenActivity[]
73
- impactRadiusEvents ImpactRadiusEvent[]
74
- cjEvents CjEvent[]
75
- flagsAssigned CreatorFlag[] @relation("UserAssignedFlags") // flags assigned to the user
76
- flagsCreated CreatorFlag[] @relation("UserCreatedFlags") // flags created by the user
77
- flagsEdited CreatorFlag[] @relation("UserEditedFlags") // flags edited by the user
53
+ referrer User? @relation("Referrals", fields: [referrerId], references: [id])
54
+ referredUsers User[] @relation("Referrals")
55
+ logs Log[]
56
+ creatorProfile CreatorProfile?
57
+ instagramProfile InstagramProfile?
58
+ youtubeProfile YoutubeProfile?
59
+ tiktokProfile TiktokProfile?
60
+ facebookProfile FacebookProfile?
61
+ twitterProfile TwitterProfile?
62
+ twitchProfile TwitchProfile?
63
+ brandProfiles BrandUserProfile[]
64
+ optIns OptIn[]
65
+ assignedBrands Brand[]
66
+ messages Message[]
67
+ socialPosts SocialPost[]
68
+ paymentTransactions PaymentTransaction[]
69
+ affiliateLinks AffiliateLink[]
70
+ campaignPins CampaignPin[]
71
+ socialProfiles SocialProfile[]
72
+ rakutenActivity RakutenActivity[]
73
+ impactRadiusEvents ImpactRadiusEvent[]
74
+ cjEvents CjEvent[]
75
+ flagsAssigned CreatorFlag[] @relation("UserAssignedFlags") // flags assigned to the user
76
+ flagsCreated CreatorFlag[] @relation("UserCreatedFlags") // flags created by the user
77
+ flagsEdited CreatorFlag[] @relation("UserEditedFlags") // flags edited by the user
78
+ affiliatePayoutBatches AffiliatePayoutBatch[]
78
79
 
79
80
  fullName String? @default(dbgenerated())
80
81
  phoneNormalised String? @default(dbgenerated())
@@ -1097,11 +1098,32 @@ model AffiliateEvent {
1097
1098
  revenue Float?
1098
1099
  commissionAmount Float?
1099
1100
  commissionPercent Float?
1101
+ platform String?
1102
+ externalOrderId String? @map("external_order_id")
1100
1103
  metaData Json @default("{}")
1101
1104
 
1102
- affiliateClickId Int
1105
+ affiliateClickId Int
1106
+ affiliatePayoutBatchId Int? @map("affiliate_payout_batch_id")
1103
1107
 
1104
- affiliateClick AffiliateClick? @relation(fields: [affiliateClickId], references: [id])
1108
+ affiliateClick AffiliateClick? @relation(fields: [affiliateClickId], references: [id])
1109
+ affiliatePayoutBatch AffiliatePayoutBatch? @relation(fields: [affiliatePayoutBatchId], references: [id])
1110
+
1111
+ @@unique([platform, externalOrderId])
1112
+ }
1113
+
1114
+ model AffiliatePayoutBatch {
1115
+ id Int @id @default(autoincrement())
1116
+ created DateTime @default(now())
1117
+ metaData Json @default("{}") @map("meta_data")
1118
+ trolleyBatchId String? @unique @map("trolley_batch_id")
1119
+
1120
+ userId Int @map("user_id")
1121
+
1122
+ user User @relation(fields: [userId], references: [id])
1123
+
1124
+ affiliateEvents AffiliateEvent[]
1125
+
1126
+ @@map("affiliate_payout_batch")
1105
1127
  }
1106
1128
 
1107
1129
  model SavedFile {
package/wasm.js CHANGED
@@ -756,8 +756,19 @@ exports.Prisma.AffiliateEventScalarFieldEnum = {
756
756
  revenue: 'revenue',
757
757
  commissionAmount: 'commissionAmount',
758
758
  commissionPercent: 'commissionPercent',
759
+ platform: 'platform',
760
+ externalOrderId: 'externalOrderId',
761
+ metaData: 'metaData',
762
+ affiliateClickId: 'affiliateClickId',
763
+ affiliatePayoutBatchId: 'affiliatePayoutBatchId'
764
+ };
765
+
766
+ exports.Prisma.AffiliatePayoutBatchScalarFieldEnum = {
767
+ id: 'id',
768
+ created: 'created',
759
769
  metaData: 'metaData',
760
- affiliateClickId: 'affiliateClickId'
770
+ trolleyBatchId: 'trolleyBatchId',
771
+ userId: 'userId'
761
772
  };
762
773
 
763
774
  exports.Prisma.SavedFileScalarFieldEnum = {
@@ -1321,7 +1332,13 @@ exports.Prisma.AffiliateClickOrderByRelevanceFieldEnum = {
1321
1332
  exports.Prisma.AffiliateEventOrderByRelevanceFieldEnum = {
1322
1333
  event: 'event',
1323
1334
  visitorIp: 'visitorIp',
1324
- urlPath: 'urlPath'
1335
+ urlPath: 'urlPath',
1336
+ platform: 'platform',
1337
+ externalOrderId: 'externalOrderId'
1338
+ };
1339
+
1340
+ exports.Prisma.AffiliatePayoutBatchOrderByRelevanceFieldEnum = {
1341
+ trolleyBatchId: 'trolleyBatchId'
1325
1342
  };
1326
1343
 
1327
1344
  exports.Prisma.SavedFileOrderByRelevanceFieldEnum = {
@@ -1506,6 +1523,7 @@ exports.Prisma.ModelName = {
1506
1523
  AffiliateLink: 'AffiliateLink',
1507
1524
  AffiliateClick: 'AffiliateClick',
1508
1525
  AffiliateEvent: 'AffiliateEvent',
1526
+ AffiliatePayoutBatch: 'AffiliatePayoutBatch',
1509
1527
  SavedFile: 'SavedFile',
1510
1528
  CampaignInvite: 'CampaignInvite',
1511
1529
  CreatorList: 'CreatorList',