@factor-wise/prisma-schema 2.0.105 → 2.0.107
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 +1 -1
- package/prisma/schema.prisma +74 -9
package/package.json
CHANGED
package/prisma/schema.prisma
CHANGED
|
@@ -719,6 +719,8 @@ model customer {
|
|
|
719
719
|
|
|
720
720
|
customerDevices customer_devices[]
|
|
721
721
|
|
|
722
|
+
notifications notification[]
|
|
723
|
+
|
|
722
724
|
@@index([mobile], map: "idx_customer_mobile")
|
|
723
725
|
@@index([email], map: "idx_customer_email")
|
|
724
726
|
@@index([pancard], map: "idx_customer_pancard")
|
|
@@ -2943,9 +2945,8 @@ model credit_improve_customer {
|
|
|
2943
2945
|
permanent_address Json?
|
|
2944
2946
|
step String? @db.VarChar(255)
|
|
2945
2947
|
customer customer @relation(fields: [customerID], references: [customerID])
|
|
2948
|
+
creaditImproveLeads credit_improve_leads[]
|
|
2946
2949
|
|
|
2947
|
-
|
|
2948
|
-
creaditImproveLeads creadit_improve_leads[]
|
|
2949
2950
|
@@index([mobile], map: "idx_customer_mobile")
|
|
2950
2951
|
@@index([pancard], map: "idx_customer_pancard")
|
|
2951
2952
|
@@index([aadharNo], map: "idx_customer_aadhar")
|
|
@@ -2958,9 +2959,9 @@ model credit_improve_customer {
|
|
|
2958
2959
|
|
|
2959
2960
|
|
|
2960
2961
|
|
|
2961
|
-
model
|
|
2962
|
+
model credit_improve_leads {
|
|
2962
2963
|
leadID Int @id @default(autoincrement())
|
|
2963
|
-
customerID Int
|
|
2964
|
+
customerID Int
|
|
2964
2965
|
|
|
2965
2966
|
purpose String? @db.VarChar(255)
|
|
2966
2967
|
loanRequeried Float @default(500)
|
|
@@ -2981,7 +2982,7 @@ model creadit_improve_leads {
|
|
|
2981
2982
|
|
|
2982
2983
|
|
|
2983
2984
|
|
|
2984
|
-
customer
|
|
2985
|
+
customer credit_improve_customer @relation(fields: [customerID], references: [ID])
|
|
2985
2986
|
creditApprovals credit_improve_approval[] @relation("CreditImproveApprovalToLead")
|
|
2986
2987
|
creditImproveLoan credit_improve_loan?
|
|
2987
2988
|
creditImproveCollections credit_improve_collection[] @relation("CreditImproveCollectionToLead")
|
|
@@ -2999,6 +3000,47 @@ model creadit_improve_leads {
|
|
|
2999
3000
|
@@index([loanType], map: "idx_loanType")
|
|
3000
3001
|
}
|
|
3001
3002
|
|
|
3003
|
+
model creadit_improve_leads {
|
|
3004
|
+
leadID Int @id @default(autoincrement())
|
|
3005
|
+
customerID Int?
|
|
3006
|
+
|
|
3007
|
+
purpose String? @db.VarChar(255)
|
|
3008
|
+
loanRequeried Float @default(500)
|
|
3009
|
+
status leads_status
|
|
3010
|
+
utmSource String @default("Website") @db.VarChar(100)
|
|
3011
|
+
fbLeads String?
|
|
3012
|
+
ip String
|
|
3013
|
+
callAssign Int
|
|
3014
|
+
creditAssign Int
|
|
3015
|
+
collectionUID Int?
|
|
3016
|
+
createdDate DateTime @default(now()) @db.Timestamp(0)
|
|
3017
|
+
updatedAt DateTime @default(now()) @db.DateTime(0)
|
|
3018
|
+
sanctionalloUID Int
|
|
3019
|
+
loanType lead_loan_type @default(improve_credit)
|
|
3020
|
+
consentOtp String?
|
|
3021
|
+
consentVerify Boolean @default(false)
|
|
3022
|
+
consentAt DateTime? @default(now()) @db.Timestamp(0)
|
|
3023
|
+
|
|
3024
|
+
|
|
3025
|
+
|
|
3026
|
+
// customer credit_improve_customer @relation(fields: [customerID], references: [ID])
|
|
3027
|
+
// creditApprovals credit_improve_approval @relation("CreditImproveApprovalToLead")
|
|
3028
|
+
// creditImproveLoan credit_improve_loan?
|
|
3029
|
+
// creditImproveCollections credit_improve_collection[] @relation("CreditImproveCollectionToLead")
|
|
3030
|
+
// creditImprovePayout credit_improve_payout?
|
|
3031
|
+
|
|
3032
|
+
@@index([customerID], map: "idx_customerID")
|
|
3033
|
+
@@index([status], map: "idx_status")
|
|
3034
|
+
@@index([utmSource], map: "idx_utmSource")
|
|
3035
|
+
@@index([fbLeads], map: "idx_fbLeads")
|
|
3036
|
+
@@index([callAssign], map: "idx_callAssign")
|
|
3037
|
+
@@index([collectionUID], map: "idx_collectionUID")
|
|
3038
|
+
@@index([sanctionalloUID], map: "idx_sanctionalloUID")
|
|
3039
|
+
@@index([createdDate], map: "idx_createdDate")
|
|
3040
|
+
@@index([updatedAt], map: "idx_updatedAt")
|
|
3041
|
+
@@index([loanType], map: "idx_loanType")
|
|
3042
|
+
}
|
|
3043
|
+
|
|
3002
3044
|
model credit_improve_approval {
|
|
3003
3045
|
approvalID Int @id @default(autoincrement())
|
|
3004
3046
|
customerID Int?
|
|
@@ -3029,7 +3071,7 @@ model credit_improve_approval {
|
|
|
3029
3071
|
updatedAt DateTime @default(now()) @db.DateTime(0)
|
|
3030
3072
|
customerApproval approval_customerApproval @default(ZERO)
|
|
3031
3073
|
|
|
3032
|
-
creditLead
|
|
3074
|
+
creditLead credit_improve_leads @relation("CreditImproveApprovalToLead", fields: [leadID], references: [leadID])
|
|
3033
3075
|
|
|
3034
3076
|
@@index([leadID])
|
|
3035
3077
|
}
|
|
@@ -3059,7 +3101,7 @@ model credit_improve_loan {
|
|
|
3059
3101
|
createdDate DateTime @default(now()) @db.DateTime(0)
|
|
3060
3102
|
updatedAt DateTime @default(now()) @db.DateTime(0)
|
|
3061
3103
|
|
|
3062
|
-
lead
|
|
3104
|
+
lead credit_improve_leads @relation(fields: [leadID], references: [leadID])
|
|
3063
3105
|
|
|
3064
3106
|
@@index([customerID])
|
|
3065
3107
|
@@index([status])
|
|
@@ -3087,7 +3129,7 @@ model credit_improve_collection {
|
|
|
3087
3129
|
collectionStatusby Int?
|
|
3088
3130
|
approvedDate DateTime? @db.DateTime(0)
|
|
3089
3131
|
|
|
3090
|
-
creditLead
|
|
3132
|
+
creditLead credit_improve_leads @relation("CreditImproveCollectionToLead", fields: [leadID], references: [leadID])
|
|
3091
3133
|
|
|
3092
3134
|
@@index([leadID])
|
|
3093
3135
|
}
|
|
@@ -3110,7 +3152,7 @@ model credit_improve_payout {
|
|
|
3110
3152
|
createdAtRzp BigInt?
|
|
3111
3153
|
isTerminal Boolean @default(false)
|
|
3112
3154
|
leadId Int @unique()
|
|
3113
|
-
credit_leads
|
|
3155
|
+
credit_leads credit_improve_leads @relation(fields: [leadId], references: [leadID])
|
|
3114
3156
|
|
|
3115
3157
|
createdAt DateTime? @default(now()) @db.Timestamp(0)
|
|
3116
3158
|
updatedAt DateTime @updatedAt
|
|
@@ -3695,6 +3737,29 @@ model customer_devices {
|
|
|
3695
3737
|
@@index([deviceToken])
|
|
3696
3738
|
}
|
|
3697
3739
|
|
|
3740
|
+
model notification {
|
|
3741
|
+
id Int @id @default(autoincrement())
|
|
3742
|
+
customerID Int
|
|
3743
|
+
type String @db.VarChar(100)
|
|
3744
|
+
title String @db.VarChar(255)
|
|
3745
|
+
body String @db.Text
|
|
3746
|
+
data Json?
|
|
3747
|
+
status NotificationStatus @default(PENDING)
|
|
3748
|
+
failureReason String? @db.VarChar(255)
|
|
3749
|
+
createdAt DateTime @default(now())
|
|
3750
|
+
updatedAt DateTime @updatedAt
|
|
3751
|
+
customer customer @relation(fields: [customerID], references: [customerID], onDelete: Cascade)
|
|
3752
|
+
|
|
3753
|
+
@@index([customerID])
|
|
3754
|
+
@@index([status])
|
|
3755
|
+
@@index([type])
|
|
3756
|
+
}
|
|
3757
|
+
|
|
3758
|
+
enum NotificationStatus {
|
|
3759
|
+
PENDING
|
|
3760
|
+
SENT
|
|
3761
|
+
FAILED
|
|
3762
|
+
}
|
|
3698
3763
|
|
|
3699
3764
|
enum DeviceType {
|
|
3700
3765
|
web
|