@factor-wise/prisma-schema 2.0.103 → 2.0.105

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factor-wise/prisma-schema",
3
- "version": "2.0.103",
3
+ "version": "2.0.105",
4
4
  "description": "Shared Prisma schema and generated client for Factor Wise projects",
5
5
  "main": "generated/client/index.js",
6
6
  "types": "generated/client/index.d.ts",
@@ -717,7 +717,7 @@ model customer {
717
717
  apps customer_app[]
718
718
  credit_improve_customer credit_improve_customer?
719
719
 
720
-
720
+ customerDevices customer_devices[]
721
721
 
722
722
  @@index([mobile], map: "idx_customer_mobile")
723
723
  @@index([email], map: "idx_customer_email")
@@ -2985,7 +2985,7 @@ model creadit_improve_leads {
2985
2985
  creditApprovals credit_improve_approval[] @relation("CreditImproveApprovalToLead")
2986
2986
  creditImproveLoan credit_improve_loan?
2987
2987
  creditImproveCollections credit_improve_collection[] @relation("CreditImproveCollectionToLead")
2988
-
2988
+ creditImprovePayout credit_improve_payout?
2989
2989
 
2990
2990
  @@index([customerID], map: "idx_customerID")
2991
2991
  @@index([status], map: "idx_status")
@@ -3092,6 +3092,42 @@ model credit_improve_collection {
3092
3092
  @@index([leadID])
3093
3093
  }
3094
3094
 
3095
+ model credit_improve_payout {
3096
+ id Int @id @default(autoincrement())
3097
+ razorpayPayoutId String? @unique
3098
+ fundAccountId String
3099
+ amount BigInt
3100
+ status PayoutStatus
3101
+ performed_by Int?
3102
+ payload Json?
3103
+ response Json?
3104
+ narration String?
3105
+ referenceId String?
3106
+ failureReason String?
3107
+ statusReason String?
3108
+ statusDescription String?
3109
+ statusSource String?
3110
+ createdAtRzp BigInt?
3111
+ isTerminal Boolean @default(false)
3112
+ leadId Int @unique()
3113
+ credit_leads creadit_improve_leads @relation(fields: [leadId], references: [leadID])
3114
+
3115
+ createdAt DateTime? @default(now()) @db.Timestamp(0)
3116
+ updatedAt DateTime @updatedAt
3117
+
3118
+ statusHistory credit_improve_PayoutStatusHistory[]
3119
+ }
3120
+
3121
+ model credit_improve_PayoutStatusHistory {
3122
+ id Int @id @default(autoincrement())
3123
+ payoutId Int
3124
+ oldStatus PayoutStatus?
3125
+ newStatus PayoutStatus
3126
+ performed_by Int?
3127
+ createdAt DateTime @default(now())
3128
+
3129
+ payout credit_improve_payout @relation(fields: [payoutId], references: [id])
3130
+ }
3095
3131
 
3096
3132
  enum usersgoogle_oauth_provider {
3097
3133
  google
@@ -3639,6 +3675,33 @@ model payment_block_dates {
3639
3675
  @@index([createdById])
3640
3676
  }
3641
3677
 
3678
+ model customer_devices {
3679
+ id Int @id @default(autoincrement())
3680
+ customerID Int
3681
+ deviceId String
3682
+ deviceType DeviceType
3683
+ deviceToken String? @unique
3684
+ deviceName String?
3685
+ appVersion String?
3686
+ osVersion String?
3687
+ ipAddress String?
3688
+ createdAt DateTime @default(now())
3689
+ updatedAt DateTime @updatedAt
3690
+
3691
+ customer customer @relation(fields: [customerID], references: [customerID], onDelete: Cascade)
3692
+
3693
+ @@unique([customerID, deviceId])
3694
+ @@index([customerID])
3695
+ @@index([deviceToken])
3696
+ }
3697
+
3698
+
3699
+ enum DeviceType {
3700
+ web
3701
+ android
3702
+ ios
3703
+ }
3704
+
3642
3705
  enum commission_type {
3643
3706
  PERCENTAGE // % based
3644
3707
  FIXED // per lead fixed amount