@factor-wise/prisma-schema 2.0.2 → 2.0.4
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 +151 -131
package/package.json
CHANGED
package/prisma/schema.prisma
CHANGED
|
@@ -511,9 +511,8 @@ model collection {
|
|
|
511
511
|
refund_utr_no String? @db.VarChar(256)
|
|
512
512
|
s3key String?
|
|
513
513
|
collectedByUser lms_users @relation("CollectionCollectedByUser", fields: [collectedBy], references: [userID])
|
|
514
|
-
lead leads @relation(fields: [leadID], references: [leadID])
|
|
515
514
|
statusUpdatedByUser lms_users? @relation("CollectionStatusUpdatedByUser", fields: [collectionStatusby], references: [userID])
|
|
516
|
-
|
|
515
|
+
lead leads @relation(fields: [leadID], references: [leadID])
|
|
517
516
|
|
|
518
517
|
@@index([leadID], map: "leadID")
|
|
519
518
|
@@index([collectedBy])
|
|
@@ -535,9 +534,6 @@ model collectionfollowup {
|
|
|
535
534
|
followup_type Int @default(0)
|
|
536
535
|
reason String? @db.Text
|
|
537
536
|
|
|
538
|
-
lead leads @relation(fields: [leadID], references: [leadID], onDelete: Cascade)
|
|
539
|
-
loan loan @relation(fields: [loanNo], references: [loanNo], onDelete: Cascade)
|
|
540
|
-
|
|
541
537
|
@@index([leadID])
|
|
542
538
|
@@index([loanNo])
|
|
543
539
|
}
|
|
@@ -625,60 +621,61 @@ model convoque_call_logs {
|
|
|
625
621
|
}
|
|
626
622
|
|
|
627
623
|
model customer {
|
|
628
|
-
customerID
|
|
629
|
-
name
|
|
630
|
-
firstName
|
|
631
|
-
middlename
|
|
632
|
-
lastName
|
|
633
|
-
fatherName
|
|
634
|
-
gender
|
|
635
|
-
dob
|
|
636
|
-
mobile
|
|
637
|
-
email
|
|
638
|
-
pancard
|
|
639
|
-
aadharNo
|
|
640
|
-
password
|
|
641
|
-
marrital
|
|
642
|
-
profile
|
|
643
|
-
otp
|
|
644
|
-
isVerified
|
|
645
|
-
employeeType
|
|
646
|
-
createdDate
|
|
647
|
-
industry
|
|
648
|
-
designation
|
|
649
|
-
working_since
|
|
650
|
-
salary_date
|
|
651
|
-
official_email
|
|
652
|
-
education
|
|
653
|
-
pan_cust_verified
|
|
654
|
-
dob_digit_match
|
|
655
|
-
razorpay_cust_id
|
|
656
|
-
reloaneligible
|
|
657
|
-
reloanremark
|
|
658
|
-
fraudcheck
|
|
659
|
-
updatedAt
|
|
660
|
-
customerappId
|
|
661
|
-
isBlocked
|
|
662
|
-
utmSource
|
|
663
|
-
alternateMobile
|
|
664
|
-
current_address
|
|
665
|
-
digioKid
|
|
666
|
-
digioMobileNumber
|
|
667
|
-
is_onboarded
|
|
668
|
-
last_login
|
|
669
|
-
loanApplied
|
|
670
|
-
permanent_address
|
|
671
|
-
presalesassign
|
|
672
|
-
companyName
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
624
|
+
customerID Int @id @default(autoincrement())
|
|
625
|
+
name String? @db.VarChar(100)
|
|
626
|
+
firstName String? @db.VarChar(100)
|
|
627
|
+
middlename String? @db.VarChar(100)
|
|
628
|
+
lastName String? @db.VarChar(100)
|
|
629
|
+
fatherName String? @db.VarChar(100)
|
|
630
|
+
gender customer_gender? @default(NA)
|
|
631
|
+
dob DateTime? @db.Date
|
|
632
|
+
mobile BigInt
|
|
633
|
+
email String? @db.VarChar(100)
|
|
634
|
+
pancard String? @db.VarChar(100)
|
|
635
|
+
aadharNo BigInt?
|
|
636
|
+
password String @default("") @db.VarChar(20)
|
|
637
|
+
marrital String? @db.VarChar(10)
|
|
638
|
+
profile String? @db.VarChar(100)
|
|
639
|
+
otp String? @default("") @db.VarChar(20)
|
|
640
|
+
isVerified Boolean @default(dbgenerated("b'0'")) @db.Bit(1)
|
|
641
|
+
employeeType customer_employeeType?
|
|
642
|
+
createdDate DateTime @default(now()) @db.DateTime(0)
|
|
643
|
+
industry String? @db.Text
|
|
644
|
+
designation String? @db.Text
|
|
645
|
+
working_since String? @db.Text
|
|
646
|
+
salary_date String? @db.Text
|
|
647
|
+
official_email String? @db.Text
|
|
648
|
+
education String? @db.Text
|
|
649
|
+
pan_cust_verified Int @default(0)
|
|
650
|
+
dob_digit_match customer_dob_digit_match?
|
|
651
|
+
razorpay_cust_id String? @db.VarChar(100)
|
|
652
|
+
reloaneligible customer_reloaneligible? @default(Approve)
|
|
653
|
+
reloanremark String? @db.VarChar(255)
|
|
654
|
+
fraudcheck Boolean? @default(false)
|
|
655
|
+
updatedAt DateTime? @default(now()) @updatedAt @db.Timestamp(0)
|
|
656
|
+
customerappId Int?
|
|
657
|
+
isBlocked Boolean @default(false)
|
|
658
|
+
utmSource String? @db.VarChar(256)
|
|
659
|
+
alternateMobile String? @db.VarChar(50)
|
|
660
|
+
current_address String? @db.Text
|
|
661
|
+
digioKid String?
|
|
662
|
+
digioMobileNumber String?
|
|
663
|
+
is_onboarded Boolean @default(false)
|
|
664
|
+
last_login DateTime @default(now()) @db.Timestamp(0)
|
|
665
|
+
loanApplied Boolean @default(false)
|
|
666
|
+
permanent_address String? @db.Text
|
|
667
|
+
presalesassign Int?
|
|
668
|
+
companyName String? @db.Text
|
|
669
|
+
razorpay_contact_id String? @db.VarChar(100)
|
|
670
|
+
addresses address[]
|
|
671
|
+
bankstatement bankstatement[]
|
|
672
|
+
customerapp customerapp? @relation(fields: [customerappId], references: [customerID], map: "fk_customer_customerapp")
|
|
673
|
+
accounts customeraccount[]
|
|
674
|
+
document document[]
|
|
675
|
+
employer employer[]
|
|
676
|
+
leads leads[]
|
|
677
|
+
reference reference[]
|
|
678
|
+
reloan_status reloan_status[]
|
|
682
679
|
|
|
683
680
|
@@index([firstName], map: "firstName")
|
|
684
681
|
@@index([firstName], map: "firstName_2")
|
|
@@ -694,7 +691,7 @@ model customer_credit_remarks {
|
|
|
694
691
|
creditRemark String @db.Text
|
|
695
692
|
createdBy Int
|
|
696
693
|
createdDate DateTime? @default(now()) @db.DateTime(0)
|
|
697
|
-
|
|
694
|
+
|
|
698
695
|
@@index([leadID], map: "approval_leadID_fkey")
|
|
699
696
|
}
|
|
700
697
|
|
|
@@ -728,22 +725,23 @@ model customer_salary {
|
|
|
728
725
|
}
|
|
729
726
|
|
|
730
727
|
model customeraccount {
|
|
731
|
-
accountID
|
|
732
|
-
leadID
|
|
733
|
-
customerID
|
|
734
|
-
accountNo
|
|
735
|
-
accountType
|
|
736
|
-
bankIfsc
|
|
737
|
-
bank
|
|
738
|
-
bankBranch
|
|
739
|
-
ip
|
|
740
|
-
credatedBy
|
|
741
|
-
status
|
|
742
|
-
createdDate
|
|
743
|
-
bank_holder_name
|
|
744
|
-
customerappId
|
|
745
|
-
|
|
746
|
-
|
|
728
|
+
accountID Int @id @default(autoincrement())
|
|
729
|
+
leadID Int
|
|
730
|
+
customerID Int?
|
|
731
|
+
accountNo String @db.VarChar(100)
|
|
732
|
+
accountType String @db.VarChar(100)
|
|
733
|
+
bankIfsc String @db.VarChar(100)
|
|
734
|
+
bank String
|
|
735
|
+
bankBranch String
|
|
736
|
+
ip String @db.VarChar(100)
|
|
737
|
+
credatedBy Int
|
|
738
|
+
status customeraccount_status
|
|
739
|
+
createdDate DateTime @default(now()) @db.DateTime(0)
|
|
740
|
+
bank_holder_name String? @db.Text
|
|
741
|
+
customerappId Int?
|
|
742
|
+
razorpay_fund_account_id String? @db.VarChar(50)
|
|
743
|
+
customer customer? @relation(fields: [customerID], references: [customerID])
|
|
744
|
+
customerapp customerapp? @relation(fields: [customerappId], references: [customerID], map: "fk_customeraccount_customerapp")
|
|
747
745
|
|
|
748
746
|
@@index([customerID], map: "customeraccount_customerID_fkey")
|
|
749
747
|
@@index([customerappId], map: "fk_customeraccount_customerapp")
|
|
@@ -971,7 +969,6 @@ model cibildata_archive {
|
|
|
971
969
|
@@index([leadID], map: "leadID")
|
|
972
970
|
}
|
|
973
971
|
|
|
974
|
-
|
|
975
972
|
model finbox_aa_dow_st {
|
|
976
973
|
id Int @id
|
|
977
974
|
customerID Int
|
|
@@ -1152,9 +1149,6 @@ model leads {
|
|
|
1152
1149
|
collections collection[]
|
|
1153
1150
|
customer customer? @relation(fields: [customerID], references: [customerID])
|
|
1154
1151
|
loan loan?
|
|
1155
|
-
collectionFollowups collectionfollowup[]
|
|
1156
|
-
creditRemarks customer_credit_remarks[]
|
|
1157
|
-
|
|
1158
1152
|
|
|
1159
1153
|
@@index([customerID], map: "leadcustomerID")
|
|
1160
1154
|
}
|
|
@@ -1298,37 +1292,36 @@ model legal_notices {
|
|
|
1298
1292
|
|
|
1299
1293
|
/// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client.
|
|
1300
1294
|
model loan {
|
|
1301
|
-
id
|
|
1302
|
-
loanID
|
|
1303
|
-
leadID
|
|
1304
|
-
loanNo
|
|
1305
|
-
customerID
|
|
1306
|
-
disbursalAmount
|
|
1307
|
-
disbursalDate
|
|
1308
|
-
disbursalTime
|
|
1309
|
-
disbursalRefrenceNo
|
|
1310
|
-
accountNo
|
|
1311
|
-
accountType
|
|
1312
|
-
bankIfsc
|
|
1313
|
-
bank
|
|
1314
|
-
bankBranch
|
|
1315
|
-
chequeDetails
|
|
1316
|
-
pdDate
|
|
1317
|
-
pdDoneBy
|
|
1318
|
-
deduction
|
|
1319
|
-
remarks
|
|
1320
|
-
status
|
|
1321
|
-
rejReason
|
|
1322
|
-
companyAccountNo
|
|
1323
|
-
ip
|
|
1324
|
-
disbursedBy
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
collectionFollowups collectionfollowup[]
|
|
1295
|
+
id Int @id @default(autoincrement())
|
|
1296
|
+
loanID Int
|
|
1297
|
+
leadID Int @unique
|
|
1298
|
+
loanNo String @unique
|
|
1299
|
+
customerID Int?
|
|
1300
|
+
disbursalAmount Float
|
|
1301
|
+
disbursalDate String? @db.Text
|
|
1302
|
+
disbursalTime DateTime @default(dbgenerated("'00:00:00'")) @db.Time(0)
|
|
1303
|
+
disbursalRefrenceNo String?
|
|
1304
|
+
accountNo String @db.VarChar(100)
|
|
1305
|
+
accountType String @db.VarChar(100)
|
|
1306
|
+
bankIfsc String @db.VarChar(100)
|
|
1307
|
+
bank String
|
|
1308
|
+
bankBranch String
|
|
1309
|
+
chequeDetails String
|
|
1310
|
+
pdDate DateTime @db.Date
|
|
1311
|
+
pdDoneBy String @db.VarChar(100)
|
|
1312
|
+
deduction Float @default(0)
|
|
1313
|
+
remarks String
|
|
1314
|
+
status loan_status
|
|
1315
|
+
rejReason String? @db.VarChar(256)
|
|
1316
|
+
companyAccountNo String @default("")
|
|
1317
|
+
ip String @db.VarChar(100)
|
|
1318
|
+
disbursedBy Int?
|
|
1319
|
+
createdDate DateTime @default(now()) @db.DateTime(0)
|
|
1320
|
+
allocate_date DateTime? @default(now()) @db.DateTime(0)
|
|
1321
|
+
allocated_by String? @db.VarChar(64)
|
|
1322
|
+
acutalDisbursalAmount Int?
|
|
1323
|
+
exported Boolean @default(false)
|
|
1324
|
+
lead leads @relation(fields: [leadID], references: [leadID])
|
|
1332
1325
|
}
|
|
1333
1326
|
|
|
1334
1327
|
/// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client.
|
|
@@ -2222,26 +2215,26 @@ model reloan_status {
|
|
|
2222
2215
|
}
|
|
2223
2216
|
|
|
2224
2217
|
model lms_users {
|
|
2225
|
-
userID
|
|
2226
|
-
name
|
|
2227
|
-
email
|
|
2228
|
-
mobile_number
|
|
2229
|
-
branch
|
|
2230
|
-
username
|
|
2231
|
-
password
|
|
2232
|
-
role
|
|
2233
|
-
status
|
|
2234
|
-
created_by
|
|
2235
|
-
created_at
|
|
2236
|
-
updated_at
|
|
2237
|
-
approvalsCredited
|
|
2238
|
-
approvalsSanctioned
|
|
2239
|
-
callhistory
|
|
2240
|
-
callhistorylogs
|
|
2241
|
-
collectionsCollected
|
|
2242
|
-
collectionsStatusUpdated collection[]
|
|
2243
|
-
lms_users_permissions
|
|
2244
|
-
reference
|
|
2218
|
+
userID Int @id @unique(map: "userID") @default(autoincrement())
|
|
2219
|
+
name String @db.VarChar(100)
|
|
2220
|
+
email String @unique(map: "email") @db.VarChar(150)
|
|
2221
|
+
mobile_number String? @db.VarChar(15)
|
|
2222
|
+
branch String? @db.VarChar(100)
|
|
2223
|
+
username String @unique(map: "username") @db.VarChar(100)
|
|
2224
|
+
password String @db.VarChar(255)
|
|
2225
|
+
role String? @db.VarChar(50)
|
|
2226
|
+
status String? @default("Active") @db.VarChar(20)
|
|
2227
|
+
created_by String? @db.VarChar(100)
|
|
2228
|
+
created_at DateTime? @default(now()) @db.Timestamp(0)
|
|
2229
|
+
updated_at DateTime? @default(now()) @db.Timestamp(0)
|
|
2230
|
+
approvalsCredited approval[] @relation("ApprovalCreditedByUser")
|
|
2231
|
+
approvalsSanctioned approval[] @relation("ApprovalSanctionByUser")
|
|
2232
|
+
callhistory callhistory[]
|
|
2233
|
+
callhistorylogs callhistorylogs[]
|
|
2234
|
+
collectionsCollected collection[] @relation("CollectionCollectedByUser")
|
|
2235
|
+
collectionsStatusUpdated collection[] @relation("CollectionStatusUpdatedByUser")
|
|
2236
|
+
lms_users_permissions lms_users_permissions?
|
|
2237
|
+
reference reference[]
|
|
2245
2238
|
}
|
|
2246
2239
|
|
|
2247
2240
|
model lms_users_permissions {
|
|
@@ -2289,6 +2282,21 @@ model bankstatement {
|
|
|
2289
2282
|
@@index([customerID], map: "bankstatement_ibfk_1")
|
|
2290
2283
|
}
|
|
2291
2284
|
|
|
2285
|
+
model disbursement_requests {
|
|
2286
|
+
id BigInt @id @default(autoincrement())
|
|
2287
|
+
loanNo String @db.VarChar(50)
|
|
2288
|
+
fund_account_id String @db.VarChar(50)
|
|
2289
|
+
amount Decimal @db.Decimal(12, 2)
|
|
2290
|
+
status disbursement_requests_status
|
|
2291
|
+
razorpay_payout_id String? @db.VarChar(50)
|
|
2292
|
+
action String? @db.VarChar(50)
|
|
2293
|
+
performed_by BigInt?
|
|
2294
|
+
payload Json?
|
|
2295
|
+
response Json?
|
|
2296
|
+
updated_at DateTime? @default(now()) @db.Timestamp(0)
|
|
2297
|
+
created_at DateTime? @default(now()) @db.Timestamp(0)
|
|
2298
|
+
}
|
|
2299
|
+
|
|
2292
2300
|
enum usersgoogle_oauth_provider {
|
|
2293
2301
|
google
|
|
2294
2302
|
facebook
|
|
@@ -2353,6 +2361,9 @@ enum collection_collectedMode {
|
|
|
2353
2361
|
INDUSIND_BANK_9999 @map("INDUSIND BANK-9999")
|
|
2354
2362
|
BHARAT_SONI_PAYTM @map("BHARAT SONI PAYTM")
|
|
2355
2363
|
NA
|
|
2364
|
+
TEMP_8483 @map("TEMP-8483")
|
|
2365
|
+
DISCOUNT
|
|
2366
|
+
IDFC
|
|
2356
2367
|
}
|
|
2357
2368
|
|
|
2358
2369
|
enum address_status {
|
|
@@ -2587,3 +2598,12 @@ enum customer_reloaneligible {
|
|
|
2587
2598
|
Applied
|
|
2588
2599
|
Pending
|
|
2589
2600
|
}
|
|
2601
|
+
|
|
2602
|
+
enum disbursement_requests_status {
|
|
2603
|
+
PENDING_APPROVAL
|
|
2604
|
+
APPROVED
|
|
2605
|
+
PAYOUT_INITIATED
|
|
2606
|
+
PAID
|
|
2607
|
+
FAILED
|
|
2608
|
+
REVERSED
|
|
2609
|
+
}
|