@factor-wise/prisma-schema 2.0.1 → 2.0.3
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 +3 -3
- package/prisma/schema.prisma +149 -131
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@factor-wise/prisma-schema",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
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",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"author": "Factor Wise",
|
|
27
27
|
"license": "ISC",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@prisma/client": "^
|
|
29
|
+
"@prisma/client": "^6.19.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^25.0.3",
|
|
33
|
-
"prisma": "^
|
|
33
|
+
"prisma": "^6.19.0"
|
|
34
34
|
}
|
|
35
35
|
}
|
package/prisma/schema.prisma
CHANGED
|
@@ -4,6 +4,7 @@ generator client {
|
|
|
4
4
|
|
|
5
5
|
datasource db {
|
|
6
6
|
provider = "mysql"
|
|
7
|
+
url = env("DATABASE_URL")
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
model address {
|
|
@@ -510,9 +511,8 @@ model collection {
|
|
|
510
511
|
refund_utr_no String? @db.VarChar(256)
|
|
511
512
|
s3key String?
|
|
512
513
|
collectedByUser lms_users @relation("CollectionCollectedByUser", fields: [collectedBy], references: [userID])
|
|
513
|
-
lead leads @relation(fields: [leadID], references: [leadID])
|
|
514
514
|
statusUpdatedByUser lms_users? @relation("CollectionStatusUpdatedByUser", fields: [collectionStatusby], references: [userID])
|
|
515
|
-
|
|
515
|
+
lead leads @relation(fields: [leadID], references: [leadID])
|
|
516
516
|
|
|
517
517
|
@@index([leadID], map: "leadID")
|
|
518
518
|
@@index([collectedBy])
|
|
@@ -534,9 +534,6 @@ model collectionfollowup {
|
|
|
534
534
|
followup_type Int @default(0)
|
|
535
535
|
reason String? @db.Text
|
|
536
536
|
|
|
537
|
-
lead leads @relation(fields: [leadID], references: [leadID], onDelete: Cascade)
|
|
538
|
-
loan loan @relation(fields: [loanNo], references: [loanNo], onDelete: Cascade)
|
|
539
|
-
|
|
540
537
|
@@index([leadID])
|
|
541
538
|
@@index([loanNo])
|
|
542
539
|
}
|
|
@@ -624,60 +621,61 @@ model convoque_call_logs {
|
|
|
624
621
|
}
|
|
625
622
|
|
|
626
623
|
model customer {
|
|
627
|
-
customerID
|
|
628
|
-
name
|
|
629
|
-
firstName
|
|
630
|
-
middlename
|
|
631
|
-
lastName
|
|
632
|
-
fatherName
|
|
633
|
-
gender
|
|
634
|
-
dob
|
|
635
|
-
mobile
|
|
636
|
-
email
|
|
637
|
-
pancard
|
|
638
|
-
aadharNo
|
|
639
|
-
password
|
|
640
|
-
marrital
|
|
641
|
-
profile
|
|
642
|
-
otp
|
|
643
|
-
isVerified
|
|
644
|
-
employeeType
|
|
645
|
-
createdDate
|
|
646
|
-
industry
|
|
647
|
-
designation
|
|
648
|
-
working_since
|
|
649
|
-
salary_date
|
|
650
|
-
official_email
|
|
651
|
-
education
|
|
652
|
-
pan_cust_verified
|
|
653
|
-
dob_digit_match
|
|
654
|
-
razorpay_cust_id
|
|
655
|
-
reloaneligible
|
|
656
|
-
reloanremark
|
|
657
|
-
fraudcheck
|
|
658
|
-
updatedAt
|
|
659
|
-
customerappId
|
|
660
|
-
isBlocked
|
|
661
|
-
utmSource
|
|
662
|
-
alternateMobile
|
|
663
|
-
current_address
|
|
664
|
-
digioKid
|
|
665
|
-
digioMobileNumber
|
|
666
|
-
is_onboarded
|
|
667
|
-
last_login
|
|
668
|
-
loanApplied
|
|
669
|
-
permanent_address
|
|
670
|
-
presalesassign
|
|
671
|
-
companyName
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
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[]
|
|
681
679
|
|
|
682
680
|
@@index([firstName], map: "firstName")
|
|
683
681
|
@@index([firstName], map: "firstName_2")
|
|
@@ -693,7 +691,7 @@ model customer_credit_remarks {
|
|
|
693
691
|
creditRemark String @db.Text
|
|
694
692
|
createdBy Int
|
|
695
693
|
createdDate DateTime? @default(now()) @db.DateTime(0)
|
|
696
|
-
|
|
694
|
+
|
|
697
695
|
@@index([leadID], map: "approval_leadID_fkey")
|
|
698
696
|
}
|
|
699
697
|
|
|
@@ -727,22 +725,23 @@ model customer_salary {
|
|
|
727
725
|
}
|
|
728
726
|
|
|
729
727
|
model customeraccount {
|
|
730
|
-
accountID
|
|
731
|
-
leadID
|
|
732
|
-
customerID
|
|
733
|
-
accountNo
|
|
734
|
-
accountType
|
|
735
|
-
bankIfsc
|
|
736
|
-
bank
|
|
737
|
-
bankBranch
|
|
738
|
-
ip
|
|
739
|
-
credatedBy
|
|
740
|
-
status
|
|
741
|
-
createdDate
|
|
742
|
-
bank_holder_name
|
|
743
|
-
customerappId
|
|
744
|
-
|
|
745
|
-
|
|
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")
|
|
746
745
|
|
|
747
746
|
@@index([customerID], map: "customeraccount_customerID_fkey")
|
|
748
747
|
@@index([customerappId], map: "fk_customeraccount_customerapp")
|
|
@@ -970,7 +969,6 @@ model cibildata_archive {
|
|
|
970
969
|
@@index([leadID], map: "leadID")
|
|
971
970
|
}
|
|
972
971
|
|
|
973
|
-
|
|
974
972
|
model finbox_aa_dow_st {
|
|
975
973
|
id Int @id
|
|
976
974
|
customerID Int
|
|
@@ -1151,9 +1149,6 @@ model leads {
|
|
|
1151
1149
|
collections collection[]
|
|
1152
1150
|
customer customer? @relation(fields: [customerID], references: [customerID])
|
|
1153
1151
|
loan loan?
|
|
1154
|
-
collectionFollowups collectionfollowup[]
|
|
1155
|
-
creditRemarks customer_credit_remarks[]
|
|
1156
|
-
|
|
1157
1152
|
|
|
1158
1153
|
@@index([customerID], map: "leadcustomerID")
|
|
1159
1154
|
}
|
|
@@ -1297,37 +1292,36 @@ model legal_notices {
|
|
|
1297
1292
|
|
|
1298
1293
|
/// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client.
|
|
1299
1294
|
model loan {
|
|
1300
|
-
id
|
|
1301
|
-
loanID
|
|
1302
|
-
leadID
|
|
1303
|
-
loanNo
|
|
1304
|
-
customerID
|
|
1305
|
-
disbursalAmount
|
|
1306
|
-
disbursalDate
|
|
1307
|
-
disbursalTime
|
|
1308
|
-
disbursalRefrenceNo
|
|
1309
|
-
accountNo
|
|
1310
|
-
accountType
|
|
1311
|
-
bankIfsc
|
|
1312
|
-
bank
|
|
1313
|
-
bankBranch
|
|
1314
|
-
chequeDetails
|
|
1315
|
-
pdDate
|
|
1316
|
-
pdDoneBy
|
|
1317
|
-
deduction
|
|
1318
|
-
remarks
|
|
1319
|
-
status
|
|
1320
|
-
rejReason
|
|
1321
|
-
companyAccountNo
|
|
1322
|
-
ip
|
|
1323
|
-
disbursedBy
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
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])
|
|
1331
1325
|
}
|
|
1332
1326
|
|
|
1333
1327
|
/// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client.
|
|
@@ -2221,26 +2215,26 @@ model reloan_status {
|
|
|
2221
2215
|
}
|
|
2222
2216
|
|
|
2223
2217
|
model lms_users {
|
|
2224
|
-
userID
|
|
2225
|
-
name
|
|
2226
|
-
email
|
|
2227
|
-
mobile_number
|
|
2228
|
-
branch
|
|
2229
|
-
username
|
|
2230
|
-
password
|
|
2231
|
-
role
|
|
2232
|
-
status
|
|
2233
|
-
created_by
|
|
2234
|
-
created_at
|
|
2235
|
-
updated_at
|
|
2236
|
-
approvalsCredited
|
|
2237
|
-
approvalsSanctioned
|
|
2238
|
-
callhistory
|
|
2239
|
-
callhistorylogs
|
|
2240
|
-
collectionsCollected
|
|
2241
|
-
collectionsStatusUpdated collection[]
|
|
2242
|
-
lms_users_permissions
|
|
2243
|
-
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[]
|
|
2244
2238
|
}
|
|
2245
2239
|
|
|
2246
2240
|
model lms_users_permissions {
|
|
@@ -2288,6 +2282,21 @@ model bankstatement {
|
|
|
2288
2282
|
@@index([customerID], map: "bankstatement_ibfk_1")
|
|
2289
2283
|
}
|
|
2290
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
|
+
|
|
2291
2300
|
enum usersgoogle_oauth_provider {
|
|
2292
2301
|
google
|
|
2293
2302
|
facebook
|
|
@@ -2586,3 +2595,12 @@ enum customer_reloaneligible {
|
|
|
2586
2595
|
Applied
|
|
2587
2596
|
Pending
|
|
2588
2597
|
}
|
|
2598
|
+
|
|
2599
|
+
enum disbursement_requests_status {
|
|
2600
|
+
PENDING_APPROVAL
|
|
2601
|
+
APPROVED
|
|
2602
|
+
PAYOUT_INITIATED
|
|
2603
|
+
PAID
|
|
2604
|
+
FAILED
|
|
2605
|
+
REVERSED
|
|
2606
|
+
}
|