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

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-4c71c2e",
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())
@@ -1089,19 +1090,42 @@ model AffiliateClick {
1089
1090
  }
1090
1091
 
1091
1092
  model AffiliateEvent {
1092
- id Int @id @default(autoincrement())
1093
+ id Int @id @default(autoincrement())
1093
1094
  event String // click, purchase, etc.
1094
- created DateTime @default(now())
1095
+ created DateTime @default(now())
1096
+ updatedAt DateTime? @updatedAt
1095
1097
  visitorIp String?
1096
1098
  urlPath String?
1097
1099
  revenue Float?
1098
1100
  commissionAmount Float?
1099
1101
  commissionPercent Float?
1100
- metaData Json @default("{}")
1102
+ platform String?
1103
+ externalOrderId String? @map("external_order_id")
1104
+ metaData Json @default("{}")
1105
+
1106
+ affiliateClickId Int
1107
+ affiliatePayoutBatchId Int? @map("affiliate_payout_batch_id")
1108
+
1109
+ affiliateClick AffiliateClick? @relation(fields: [affiliateClickId], references: [id])
1110
+ affiliatePayoutBatch AffiliatePayoutBatch? @relation(fields: [affiliatePayoutBatchId], references: [id])
1111
+
1112
+ @@unique([platform, externalOrderId])
1113
+ }
1114
+
1115
+ model AffiliatePayoutBatch {
1116
+ id Int @id @default(autoincrement())
1117
+ createdAt DateTime @default(now())
1118
+ updatedAt DateTime @updatedAt
1119
+ metaData Json @default("{}") @map("meta_data")
1120
+ trolleyBatchId String? @unique @map("trolley_batch_id")
1121
+
1122
+ userId Int @map("user_id")
1123
+
1124
+ user User @relation(fields: [userId], references: [id])
1101
1125
 
1102
- affiliateClickId Int
1126
+ affiliateEvents AffiliateEvent[]
1103
1127
 
1104
- affiliateClick AffiliateClick? @relation(fields: [affiliateClickId], references: [id])
1128
+ @@map("affiliate_payout_batch")
1105
1129
  }
1106
1130
 
1107
1131
  model SavedFile {
package/wasm.js CHANGED
@@ -751,13 +751,26 @@ exports.Prisma.AffiliateEventScalarFieldEnum = {
751
751
  id: 'id',
752
752
  event: 'event',
753
753
  created: 'created',
754
+ updatedAt: 'updatedAt',
754
755
  visitorIp: 'visitorIp',
755
756
  urlPath: 'urlPath',
756
757
  revenue: 'revenue',
757
758
  commissionAmount: 'commissionAmount',
758
759
  commissionPercent: 'commissionPercent',
760
+ platform: 'platform',
761
+ externalOrderId: 'externalOrderId',
762
+ metaData: 'metaData',
763
+ affiliateClickId: 'affiliateClickId',
764
+ affiliatePayoutBatchId: 'affiliatePayoutBatchId'
765
+ };
766
+
767
+ exports.Prisma.AffiliatePayoutBatchScalarFieldEnum = {
768
+ id: 'id',
769
+ createdAt: 'createdAt',
770
+ updatedAt: 'updatedAt',
759
771
  metaData: 'metaData',
760
- affiliateClickId: 'affiliateClickId'
772
+ trolleyBatchId: 'trolleyBatchId',
773
+ userId: 'userId'
761
774
  };
762
775
 
763
776
  exports.Prisma.SavedFileScalarFieldEnum = {
@@ -1321,7 +1334,13 @@ exports.Prisma.AffiliateClickOrderByRelevanceFieldEnum = {
1321
1334
  exports.Prisma.AffiliateEventOrderByRelevanceFieldEnum = {
1322
1335
  event: 'event',
1323
1336
  visitorIp: 'visitorIp',
1324
- urlPath: 'urlPath'
1337
+ urlPath: 'urlPath',
1338
+ platform: 'platform',
1339
+ externalOrderId: 'externalOrderId'
1340
+ };
1341
+
1342
+ exports.Prisma.AffiliatePayoutBatchOrderByRelevanceFieldEnum = {
1343
+ trolleyBatchId: 'trolleyBatchId'
1325
1344
  };
1326
1345
 
1327
1346
  exports.Prisma.SavedFileOrderByRelevanceFieldEnum = {
@@ -1506,6 +1525,7 @@ exports.Prisma.ModelName = {
1506
1525
  AffiliateLink: 'AffiliateLink',
1507
1526
  AffiliateClick: 'AffiliateClick',
1508
1527
  AffiliateEvent: 'AffiliateEvent',
1528
+ AffiliatePayoutBatch: 'AffiliatePayoutBatch',
1509
1529
  SavedFile: 'SavedFile',
1510
1530
  CampaignInvite: 'CampaignInvite',
1511
1531
  CreatorList: 'CreatorList',