@factor-wise/prisma-schema 2.0.104 → 2.0.106

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.104",
3
+ "version": "2.0.106",
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")
@@ -2943,9 +2943,8 @@ model credit_improve_customer {
2943
2943
  permanent_address Json?
2944
2944
  step String? @db.VarChar(255)
2945
2945
  customer customer @relation(fields: [customerID], references: [customerID])
2946
+ creaditImproveLeads credit_improve_leads[]
2946
2947
 
2947
-
2948
- creaditImproveLeads creadit_improve_leads[]
2949
2948
  @@index([mobile], map: "idx_customer_mobile")
2950
2949
  @@index([pancard], map: "idx_customer_pancard")
2951
2950
  @@index([aadharNo], map: "idx_customer_aadhar")
@@ -2958,9 +2957,9 @@ model credit_improve_customer {
2958
2957
 
2959
2958
 
2960
2959
 
2961
- model creadit_improve_leads {
2960
+ model credit_improve_leads {
2962
2961
  leadID Int @id @default(autoincrement())
2963
- customerID Int?
2962
+ customerID Int
2964
2963
 
2965
2964
  purpose String? @db.VarChar(255)
2966
2965
  loanRequeried Float @default(500)
@@ -2981,7 +2980,7 @@ model creadit_improve_leads {
2981
2980
 
2982
2981
 
2983
2982
 
2984
- customer credit_improve_customer? @relation(fields: [customerID], references: [ID])
2983
+ customer credit_improve_customer @relation(fields: [customerID], references: [ID])
2985
2984
  creditApprovals credit_improve_approval[] @relation("CreditImproveApprovalToLead")
2986
2985
  creditImproveLoan credit_improve_loan?
2987
2986
  creditImproveCollections credit_improve_collection[] @relation("CreditImproveCollectionToLead")
@@ -2999,6 +2998,47 @@ model creadit_improve_leads {
2999
2998
  @@index([loanType], map: "idx_loanType")
3000
2999
  }
3001
3000
 
3001
+ model creadit_improve_leads {
3002
+ leadID Int @id @default(autoincrement())
3003
+ customerID Int?
3004
+
3005
+ purpose String? @db.VarChar(255)
3006
+ loanRequeried Float @default(500)
3007
+ status leads_status
3008
+ utmSource String @default("Website") @db.VarChar(100)
3009
+ fbLeads String?
3010
+ ip String
3011
+ callAssign Int
3012
+ creditAssign Int
3013
+ collectionUID Int?
3014
+ createdDate DateTime @default(now()) @db.Timestamp(0)
3015
+ updatedAt DateTime @default(now()) @db.DateTime(0)
3016
+ sanctionalloUID Int
3017
+ loanType lead_loan_type @default(improve_credit)
3018
+ consentOtp String?
3019
+ consentVerify Boolean @default(false)
3020
+ consentAt DateTime? @default(now()) @db.Timestamp(0)
3021
+
3022
+
3023
+
3024
+ // customer credit_improve_customer @relation(fields: [customerID], references: [ID])
3025
+ // creditApprovals credit_improve_approval @relation("CreditImproveApprovalToLead")
3026
+ // creditImproveLoan credit_improve_loan?
3027
+ // creditImproveCollections credit_improve_collection[] @relation("CreditImproveCollectionToLead")
3028
+ // creditImprovePayout credit_improve_payout?
3029
+
3030
+ @@index([customerID], map: "idx_customerID")
3031
+ @@index([status], map: "idx_status")
3032
+ @@index([utmSource], map: "idx_utmSource")
3033
+ @@index([fbLeads], map: "idx_fbLeads")
3034
+ @@index([callAssign], map: "idx_callAssign")
3035
+ @@index([collectionUID], map: "idx_collectionUID")
3036
+ @@index([sanctionalloUID], map: "idx_sanctionalloUID")
3037
+ @@index([createdDate], map: "idx_createdDate")
3038
+ @@index([updatedAt], map: "idx_updatedAt")
3039
+ @@index([loanType], map: "idx_loanType")
3040
+ }
3041
+
3002
3042
  model credit_improve_approval {
3003
3043
  approvalID Int @id @default(autoincrement())
3004
3044
  customerID Int?
@@ -3029,7 +3069,7 @@ model credit_improve_approval {
3029
3069
  updatedAt DateTime @default(now()) @db.DateTime(0)
3030
3070
  customerApproval approval_customerApproval @default(ZERO)
3031
3071
 
3032
- creditLead creadit_improve_leads @relation("CreditImproveApprovalToLead", fields: [leadID], references: [leadID])
3072
+ creditLead credit_improve_leads @relation("CreditImproveApprovalToLead", fields: [leadID], references: [leadID])
3033
3073
 
3034
3074
  @@index([leadID])
3035
3075
  }
@@ -3059,7 +3099,7 @@ model credit_improve_loan {
3059
3099
  createdDate DateTime @default(now()) @db.DateTime(0)
3060
3100
  updatedAt DateTime @default(now()) @db.DateTime(0)
3061
3101
 
3062
- lead creadit_improve_leads @relation(fields: [leadID], references: [leadID])
3102
+ lead credit_improve_leads @relation(fields: [leadID], references: [leadID])
3063
3103
 
3064
3104
  @@index([customerID])
3065
3105
  @@index([status])
@@ -3087,7 +3127,7 @@ model credit_improve_collection {
3087
3127
  collectionStatusby Int?
3088
3128
  approvedDate DateTime? @db.DateTime(0)
3089
3129
 
3090
- creditLead creadit_improve_leads @relation("CreditImproveCollectionToLead", fields: [leadID], references: [leadID])
3130
+ creditLead credit_improve_leads @relation("CreditImproveCollectionToLead", fields: [leadID], references: [leadID])
3091
3131
 
3092
3132
  @@index([leadID])
3093
3133
  }
@@ -3110,7 +3150,7 @@ model credit_improve_payout {
3110
3150
  createdAtRzp BigInt?
3111
3151
  isTerminal Boolean @default(false)
3112
3152
  leadId Int @unique()
3113
- credit_leads creadit_improve_leads @relation(fields: [leadId], references: [leadID])
3153
+ credit_leads credit_improve_leads @relation(fields: [leadId], references: [leadID])
3114
3154
 
3115
3155
  createdAt DateTime? @default(now()) @db.Timestamp(0)
3116
3156
  updatedAt DateTime @updatedAt
@@ -3675,6 +3715,33 @@ model payment_block_dates {
3675
3715
  @@index([createdById])
3676
3716
  }
3677
3717
 
3718
+ model customer_devices {
3719
+ id Int @id @default(autoincrement())
3720
+ customerID Int
3721
+ deviceId String
3722
+ deviceType DeviceType
3723
+ deviceToken String? @unique
3724
+ deviceName String?
3725
+ appVersion String?
3726
+ osVersion String?
3727
+ ipAddress String?
3728
+ createdAt DateTime @default(now())
3729
+ updatedAt DateTime @updatedAt
3730
+
3731
+ customer customer @relation(fields: [customerID], references: [customerID], onDelete: Cascade)
3732
+
3733
+ @@unique([customerID, deviceId])
3734
+ @@index([customerID])
3735
+ @@index([deviceToken])
3736
+ }
3737
+
3738
+
3739
+ enum DeviceType {
3740
+ web
3741
+ android
3742
+ ios
3743
+ }
3744
+
3678
3745
  enum commission_type {
3679
3746
  PERCENTAGE // % based
3680
3747
  FIXED // per lead fixed amount