@creator.co/creatorco-prisma-client 1.0.80 → 1.0.81

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
@@ -92,7 +92,7 @@
92
92
  },
93
93
  "./*": "./*"
94
94
  },
95
- "version": "1.0.80",
95
+ "version": "1.0.81",
96
96
  "sideEffects": false,
97
97
  "description": "Prisma client for creatorco Database"
98
98
  }
package/schema.prisma CHANGED
@@ -17,7 +17,7 @@ generator kysely {
17
17
  generator client {
18
18
  provider = "prisma-client-js"
19
19
  output = "../../client/creatorco/client"
20
- previewFeatures = ["fullTextIndex", "fullTextSearch"]
20
+ previewFeatures = ["fullTextIndex", "fullTextSearch", "views"]
21
21
  // macos (arm or x86), native, linux arm64 ssl3.x, windows
22
22
  binaryTargets = ["native", "darwin", "darwin-arm64", "linux-arm64-openssl-3.0.x", "windows", "debian-openssl-3.0.x", "linux-musl-arm64-openssl-3.0.x", "linux-arm64-openssl-1.0.x", "linux-musl-arm64-openssl-1.1.x"]
23
23
  }
@@ -786,7 +786,7 @@ model OptIn {
786
786
  seen Boolean @default(false)
787
787
  instructions String? @db.Text
788
788
  paymentAmount Float?
789
- paymentStatus String @default("pending") /// @deprecated join with TrolleyPayment for actual status
789
+ paymentStatus String @default("pending")
790
790
  extraData Json @default("{}")
791
791
  favoritedDate DateTime?
792
792
  rating Json?
@@ -821,21 +821,24 @@ model OptIn {
821
821
  }
822
822
 
823
823
  model TrolleyPayment {
824
- id Int @id @default(autoincrement())
825
- paymentId String @unique
826
- type trolleyPaymentType?
827
- status trolleyPaymentStatus
828
- optInId Int?
829
- paymentAmount Int
830
- metaData Json @default("{}")
824
+ id Int @id @default(autoincrement())
825
+ paymentId String @unique
826
+ type trolleyPaymentType?
827
+ status trolleyPaymentStatus
828
+ optInId Int?
829
+ paymentTransactionId Int?
830
+ paymentAmount Int
831
+ metaData Json @default("{}")
831
832
 
832
- optIn OptIn? @relation(fields: [optInId], references: [id])
833
+ optIn OptIn? @relation(fields: [optInId], references: [id])
834
+ paymentTransaction PaymentTransaction? @relation(fields: [paymentTransactionId], references: [id])
833
835
  }
834
836
 
835
837
  enum trolleyPaymentType {
836
838
  optIn
837
839
  tip
838
840
  affiliate
841
+ withdrawal
839
842
  }
840
843
 
841
844
  enum trolleyPaymentStatus {
@@ -1077,9 +1080,25 @@ model PaymentTransaction {
1077
1080
  prevTransaction PaymentTransaction? @relation("TransactionHistory", fields: [prevTransactionId], references: [id])
1078
1081
  nextTransaction PaymentTransaction? @relation("TransactionHistory")
1079
1082
 
1083
+ trolleyPayments TrolleyPayment[]
1084
+
1080
1085
  @@index([accountId])
1081
1086
  }
1082
1087
 
1088
+ /// View to get the latest PaymentTransaction for each creator where accountId equals creatorId
1089
+ view LatestCreatorPaymentTransaction {
1090
+ id Int @id
1091
+ balance Float
1092
+ type String
1093
+ date DateTime
1094
+ notes String?
1095
+ metaData Json
1096
+ accountId Int
1097
+ creatorId Int?
1098
+
1099
+ @@map("latest_creator_payment_transaction")
1100
+ }
1101
+
1083
1102
  model ExternalAffiliateClick {
1084
1103
  id Int @id @default(autoincrement())
1085
1104
  program String
package/wasm.js CHANGED
@@ -581,6 +581,7 @@ exports.Prisma.TrolleyPaymentScalarFieldEnum = {
581
581
  type: 'type',
582
582
  status: 'status',
583
583
  optInId: 'optInId',
584
+ paymentTransactionId: 'paymentTransactionId',
584
585
  paymentAmount: 'paymentAmount',
585
586
  metaData: 'metaData'
586
587
  };
@@ -1175,6 +1176,17 @@ exports.Prisma.SequenceOutboundReplyEmailScalarFieldEnum = {
1175
1176
  updatedAt: 'updatedAt'
1176
1177
  };
1177
1178
 
1179
+ exports.Prisma.LatestCreatorPaymentTransactionScalarFieldEnum = {
1180
+ id: 'id',
1181
+ balance: 'balance',
1182
+ type: 'type',
1183
+ date: 'date',
1184
+ notes: 'notes',
1185
+ metaData: 'metaData',
1186
+ accountId: 'accountId',
1187
+ creatorId: 'creatorId'
1188
+ };
1189
+
1178
1190
  exports.Prisma.SortOrder = {
1179
1191
  asc: 'asc',
1180
1192
  desc: 'desc'
@@ -1635,10 +1647,16 @@ exports.Prisma.EmailTrackingOrderByRelevanceFieldEnum = {
1635
1647
  exports.Prisma.SequenceOutboundReplyEmailOrderByRelevanceFieldEnum = {
1636
1648
  typeId: 'typeId'
1637
1649
  };
1650
+
1651
+ exports.Prisma.LatestCreatorPaymentTransactionOrderByRelevanceFieldEnum = {
1652
+ type: 'type',
1653
+ notes: 'notes'
1654
+ };
1638
1655
  exports.trolleyPaymentType = exports.$Enums.trolleyPaymentType = {
1639
1656
  optIn: 'optIn',
1640
1657
  tip: 'tip',
1641
- affiliate: 'affiliate'
1658
+ affiliate: 'affiliate',
1659
+ withdrawal: 'withdrawal'
1642
1660
  };
1643
1661
 
1644
1662
  exports.trolleyPaymentStatus = exports.$Enums.trolleyPaymentStatus = {
@@ -1757,7 +1775,8 @@ exports.Prisma.ModelName = {
1757
1775
  CreditRefundBatch: 'CreditRefundBatch',
1758
1776
  EmailProvider: 'EmailProvider',
1759
1777
  EmailTracking: 'EmailTracking',
1760
- SequenceOutboundReplyEmail: 'SequenceOutboundReplyEmail'
1778
+ SequenceOutboundReplyEmail: 'SequenceOutboundReplyEmail',
1779
+ LatestCreatorPaymentTransaction: 'LatestCreatorPaymentTransaction'
1761
1780
  };
1762
1781
 
1763
1782
  /**