@factor-wise/prisma-schema 1.0.5 → 1.0.7
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 +113 -79
package/package.json
CHANGED
package/prisma/schema.prisma
CHANGED
|
@@ -9,8 +9,7 @@ datasource db {
|
|
|
9
9
|
|
|
10
10
|
model address {
|
|
11
11
|
addressID Int @id @default(autoincrement())
|
|
12
|
-
customerID Int
|
|
13
|
-
customer customer @relation(fields: [customerID], references: [customerID])
|
|
12
|
+
customerID Int?
|
|
14
13
|
type address_type?
|
|
15
14
|
address String?
|
|
16
15
|
city String?
|
|
@@ -26,8 +25,12 @@ model address {
|
|
|
26
25
|
fetchedBy String?
|
|
27
26
|
kyc_current_add String? @db.Text
|
|
28
27
|
kyc_permanent_add String? @db.Text
|
|
28
|
+
customerappId Int?
|
|
29
|
+
customer customer? @relation(fields: [customerID], references: [customerID], map: "fk_address_customer")
|
|
30
|
+
customerapp customerapp? @relation(fields: [customerappId], references: [customerID], map: "fk_address_customerapp")
|
|
29
31
|
|
|
30
32
|
@@index([customerID], map: "addresscontactID")
|
|
33
|
+
@@index([customerappId], map: "fk_address_customerapp")
|
|
31
34
|
}
|
|
32
35
|
|
|
33
36
|
model alternative_contact {
|
|
@@ -249,6 +252,8 @@ model approval {
|
|
|
249
252
|
employmentType String? @db.VarChar(50)
|
|
250
253
|
disbursalaccountid Int?
|
|
251
254
|
lead leads @relation(fields: [leadID], references: [leadID])
|
|
255
|
+
|
|
256
|
+
@@index([leadID], map: "approval_leadID_fkey")
|
|
252
257
|
}
|
|
253
258
|
|
|
254
259
|
model appvedio {
|
|
@@ -364,8 +369,11 @@ model callhistory {
|
|
|
364
369
|
callbackTime DateTime? @db.Date
|
|
365
370
|
calledBy Int
|
|
366
371
|
createdDate DateTime @default(now()) @db.DateTime(0)
|
|
372
|
+
calledByUser users @relation(fields: [calledBy], references: [userID])
|
|
367
373
|
lead leads @relation(fields: [leadID], references: [leadID])
|
|
368
|
-
|
|
374
|
+
|
|
375
|
+
@@index([calledBy], map: "callhistory_calledBy_fkey")
|
|
376
|
+
@@index([leadID], map: "callhistory_leadID_fkey")
|
|
369
377
|
}
|
|
370
378
|
|
|
371
379
|
model callhistoryapp {
|
|
@@ -392,10 +400,13 @@ model callhistorylogs {
|
|
|
392
400
|
noteli String @db.VarChar(512)
|
|
393
401
|
remark String
|
|
394
402
|
callbackTime DateTime? @db.Date
|
|
395
|
-
calledBy Int
|
|
403
|
+
calledBy Int?
|
|
396
404
|
createdDate DateTime @default(now()) @db.DateTime(0)
|
|
405
|
+
calledByUser users? @relation(fields: [calledBy], references: [userID])
|
|
397
406
|
lead leads @relation(fields: [leadID], references: [leadID])
|
|
398
|
-
|
|
407
|
+
|
|
408
|
+
@@index([calledBy], map: "callhistorylogs_calledBy_fkey")
|
|
409
|
+
@@index([leadID], map: "callhistorylogs_leadID_fkey")
|
|
399
410
|
}
|
|
400
411
|
|
|
401
412
|
model cashfree_emcharge {
|
|
@@ -629,15 +640,20 @@ model customer {
|
|
|
629
640
|
reloanremark String? @db.VarChar(255)
|
|
630
641
|
fraudcheck Boolean? @default(false)
|
|
631
642
|
updatedAt DateTime? @default(now()) @updatedAt @db.Timestamp(0)
|
|
632
|
-
|
|
633
|
-
|
|
643
|
+
customerappId Int?
|
|
644
|
+
isBlocked Boolean @default(false)
|
|
634
645
|
addresses address[]
|
|
646
|
+
customerapp customerapp? @relation(fields: [customerappId], references: [customerID], map: "fk_customer_customerapp")
|
|
647
|
+
accounts customeraccount[]
|
|
648
|
+
document document[]
|
|
635
649
|
employer employer[]
|
|
650
|
+
leads leads[]
|
|
636
651
|
reference reference[]
|
|
637
|
-
|
|
652
|
+
reloan_status reloan_status[]
|
|
638
653
|
|
|
639
654
|
@@index([firstName], map: "firstName")
|
|
640
655
|
@@index([firstName], map: "firstName_2")
|
|
656
|
+
@@index([customerappId], map: "fk_customer_customerapp")
|
|
641
657
|
}
|
|
642
658
|
|
|
643
659
|
model customer_credit_remarks {
|
|
@@ -681,7 +697,7 @@ model customer_salary {
|
|
|
681
697
|
model customeraccount {
|
|
682
698
|
accountID Int @id @default(autoincrement())
|
|
683
699
|
leadID Int
|
|
684
|
-
customerID Int
|
|
700
|
+
customerID Int?
|
|
685
701
|
accountNo String @db.VarChar(100)
|
|
686
702
|
accountType String @db.VarChar(100)
|
|
687
703
|
bankIfsc String @db.VarChar(100)
|
|
@@ -692,7 +708,12 @@ model customeraccount {
|
|
|
692
708
|
status customeraccount_status
|
|
693
709
|
createdDate DateTime @default(now()) @db.DateTime(0)
|
|
694
710
|
bank_holder_name String? @db.Text
|
|
695
|
-
|
|
711
|
+
customerappId Int?
|
|
712
|
+
customer customer? @relation(fields: [customerID], references: [customerID])
|
|
713
|
+
customerapp customerapp? @relation(fields: [customerappId], references: [customerID], map: "fk_customeraccount_customerapp")
|
|
714
|
+
|
|
715
|
+
@@index([customerID], map: "customeraccount_customerID_fkey")
|
|
716
|
+
@@index([customerappId], map: "fk_customeraccount_customerapp")
|
|
696
717
|
}
|
|
697
718
|
|
|
698
719
|
model custumer_lead_log {
|
|
@@ -741,21 +762,25 @@ model disblogs {
|
|
|
741
762
|
}
|
|
742
763
|
|
|
743
764
|
model document {
|
|
744
|
-
documentID
|
|
745
|
-
customerID
|
|
746
|
-
documentType
|
|
747
|
-
documentFile
|
|
748
|
-
pushData
|
|
749
|
-
password
|
|
750
|
-
status
|
|
751
|
-
verifiedBy
|
|
752
|
-
verifiedDate
|
|
753
|
-
uploadBy
|
|
754
|
-
uploadedDate
|
|
755
|
-
type
|
|
756
|
-
location
|
|
765
|
+
documentID Int @id @default(autoincrement())
|
|
766
|
+
customerID Int?
|
|
767
|
+
documentType String
|
|
768
|
+
documentFile String
|
|
769
|
+
pushData Json?
|
|
770
|
+
password String? @db.VarChar(200)
|
|
771
|
+
status document_status @default(Pending)
|
|
772
|
+
verifiedBy Int @default(1)
|
|
773
|
+
verifiedDate DateTime? @db.Date
|
|
774
|
+
uploadBy Int
|
|
775
|
+
uploadedDate DateTime @default(now()) @db.DateTime(0)
|
|
776
|
+
type String? @db.Text
|
|
777
|
+
location String? @db.VarChar(255)
|
|
778
|
+
customerappId Int?
|
|
779
|
+
customer customer? @relation(fields: [customerID], references: [customerID], map: "fk_document_customer")
|
|
780
|
+
customerapp customerapp? @relation(fields: [customerappId], references: [customerID], map: "fk_document_customerapp")
|
|
757
781
|
|
|
758
782
|
@@index([customerID], map: "customerID")
|
|
783
|
+
@@index([customerappId], map: "fk_document_customerapp")
|
|
759
784
|
}
|
|
760
785
|
|
|
761
786
|
model documentfinbox {
|
|
@@ -838,7 +863,7 @@ model emis {
|
|
|
838
863
|
|
|
839
864
|
model employer {
|
|
840
865
|
employerID Int @id @default(autoincrement())
|
|
841
|
-
customerID Int
|
|
866
|
+
customerID Int?
|
|
842
867
|
employerName String
|
|
843
868
|
empEmail String?
|
|
844
869
|
empDob String?
|
|
@@ -855,9 +880,12 @@ model employer {
|
|
|
855
880
|
status employer_status @default(Not_Verified)
|
|
856
881
|
verifiedBy Int @default(1)
|
|
857
882
|
createdDate DateTime @db.DateTime(0)
|
|
858
|
-
|
|
883
|
+
customerappId Int?
|
|
884
|
+
customer customer? @relation(fields: [customerID], references: [customerID], map: "fk_employer_customer")
|
|
885
|
+
customerapp customerapp? @relation(fields: [customerappId], references: [customerID], map: "fk_employer_customerapp")
|
|
859
886
|
|
|
860
887
|
@@index([customerID], map: "customerID")
|
|
888
|
+
@@index([customerappId], map: "fk_employer_customerapp")
|
|
861
889
|
}
|
|
862
890
|
|
|
863
891
|
model facebook_lead {
|
|
@@ -1049,19 +1077,19 @@ model eagreement {
|
|
|
1049
1077
|
|
|
1050
1078
|
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
|
1051
1079
|
model leads {
|
|
1052
|
-
leadID Int
|
|
1080
|
+
leadID Int @id @default(autoincrement())
|
|
1053
1081
|
customerID Int?
|
|
1054
1082
|
userID Int?
|
|
1055
|
-
purpose String?
|
|
1056
|
-
loanRequeried Float
|
|
1057
|
-
tenure Int
|
|
1083
|
+
purpose String? @db.VarChar(255)
|
|
1084
|
+
loanRequeried Float @default(10000)
|
|
1085
|
+
tenure Int @default(5)
|
|
1058
1086
|
monthlyIncome Float
|
|
1059
|
-
salaryMode String?
|
|
1060
|
-
city String?
|
|
1087
|
+
salaryMode String? @db.VarChar(200)
|
|
1088
|
+
city String? @db.VarChar(255)
|
|
1061
1089
|
state String?
|
|
1062
1090
|
pincode BigInt
|
|
1063
1091
|
status leads_status
|
|
1064
|
-
utmSource String
|
|
1092
|
+
utmSource String @default("Website") @db.VarChar(100)
|
|
1065
1093
|
fbLeads String?
|
|
1066
1094
|
domainName String?
|
|
1067
1095
|
commingLeadsDate String?
|
|
@@ -1069,23 +1097,23 @@ model leads {
|
|
|
1069
1097
|
callAssign Int
|
|
1070
1098
|
creditAssign Int
|
|
1071
1099
|
collectionUID Int?
|
|
1072
|
-
createdDate DateTime
|
|
1073
|
-
alloUID String
|
|
1074
|
-
sanctionalloUID String
|
|
1075
|
-
sanctionAppID String
|
|
1076
|
-
entity_id String?
|
|
1077
|
-
field_officer_id String?
|
|
1078
|
-
field_officer_assign_date String?
|
|
1079
|
-
field_officer_lead_status Int
|
|
1100
|
+
createdDate DateTime @default(now()) @db.Timestamp(0)
|
|
1101
|
+
alloUID String @default("no") @db.VarChar(216)
|
|
1102
|
+
sanctionalloUID String @default("no") @db.VarChar(216)
|
|
1103
|
+
sanctionAppID String @default("no") @db.VarChar(216)
|
|
1104
|
+
entity_id String? @db.Text
|
|
1105
|
+
field_officer_id String? @db.Text
|
|
1106
|
+
field_officer_assign_date String? @db.Text
|
|
1107
|
+
field_officer_lead_status Int @default(0)
|
|
1080
1108
|
em_id BigInt?
|
|
1081
|
-
step String?
|
|
1082
|
-
kfs leads_kfs
|
|
1083
|
-
bureau_consent Int
|
|
1084
|
-
emandatebypass Boolean?
|
|
1085
|
-
|
|
1109
|
+
step String? @db.Text
|
|
1110
|
+
kfs leads_kfs @default(ZERO)
|
|
1111
|
+
bureau_consent Int @default(0)
|
|
1112
|
+
emandatebypass Boolean? @default(false)
|
|
1113
|
+
approvals approval[]
|
|
1086
1114
|
callHistories callhistory[]
|
|
1087
1115
|
callhistorylogs callhistorylogs[]
|
|
1088
|
-
|
|
1116
|
+
customer customer? @relation(fields: [customerID], references: [customerID])
|
|
1089
1117
|
|
|
1090
1118
|
@@index([customerID], map: "leadcustomerID")
|
|
1091
1119
|
}
|
|
@@ -1684,8 +1712,11 @@ model reference {
|
|
|
1684
1712
|
reference_verify Int @default(0)
|
|
1685
1713
|
is_verified Int @default(0)
|
|
1686
1714
|
recording String? @db.Text
|
|
1687
|
-
customer customer @relation(fields: [customerID], references: [customerID])
|
|
1688
1715
|
createdByUser users @relation(fields: [createdBy], references: [userID])
|
|
1716
|
+
customer customer @relation(fields: [customerID], references: [customerID])
|
|
1717
|
+
|
|
1718
|
+
@@index([createdBy], map: "reference_createdBy_fkey")
|
|
1719
|
+
@@index([customerID], map: "reference_customerID_fkey")
|
|
1689
1720
|
}
|
|
1690
1721
|
|
|
1691
1722
|
/// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client.
|
|
@@ -1793,29 +1824,29 @@ model user_ip_details {
|
|
|
1793
1824
|
|
|
1794
1825
|
/// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client.
|
|
1795
1826
|
model users {
|
|
1796
|
-
userID Int
|
|
1797
|
-
name String
|
|
1827
|
+
userID Int @id @default(autoincrement())
|
|
1828
|
+
name String @db.VarChar(100)
|
|
1798
1829
|
email String
|
|
1799
|
-
mobile String
|
|
1800
|
-
did_no String?
|
|
1830
|
+
mobile String @db.VarChar(20)
|
|
1831
|
+
did_no String? @db.VarChar(36)
|
|
1801
1832
|
branch String
|
|
1802
1833
|
userName String
|
|
1803
1834
|
password String
|
|
1804
1835
|
role users_role
|
|
1805
|
-
status users_status
|
|
1836
|
+
status users_status @default(Active)
|
|
1806
1837
|
createdBy Int
|
|
1807
|
-
createdDate DateTime
|
|
1808
|
-
accessPer String
|
|
1809
|
-
utype String
|
|
1810
|
-
firebase_token String?
|
|
1811
|
-
device_token String?
|
|
1812
|
-
lip String
|
|
1813
|
-
convoque_login_id String?
|
|
1814
|
-
convoque_exten String?
|
|
1815
|
-
reloan_status reloan_status[]
|
|
1816
|
-
reference reference[]
|
|
1838
|
+
createdDate DateTime @default(now()) @db.DateTime(0)
|
|
1839
|
+
accessPer String @db.MediumText
|
|
1840
|
+
utype String @default("ramfin-corp") @db.VarChar(216)
|
|
1841
|
+
firebase_token String? @db.Text
|
|
1842
|
+
device_token String? @db.Text
|
|
1843
|
+
lip String @default("no") @db.VarChar(64)
|
|
1844
|
+
convoque_login_id String? @db.Text
|
|
1845
|
+
convoque_exten String? @db.Text
|
|
1817
1846
|
callhistory callhistory[]
|
|
1818
1847
|
callhistorylogs callhistorylogs[]
|
|
1848
|
+
reference reference[]
|
|
1849
|
+
reloan_status reloan_status[]
|
|
1819
1850
|
}
|
|
1820
1851
|
|
|
1821
1852
|
/// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client.
|
|
@@ -2016,6 +2047,11 @@ model customerapp {
|
|
|
2016
2047
|
bureau_consent Int @default(0)
|
|
2017
2048
|
token String?
|
|
2018
2049
|
presalesassign Int
|
|
2050
|
+
address address[]
|
|
2051
|
+
customer customer[]
|
|
2052
|
+
customeraccount customeraccount[]
|
|
2053
|
+
document document[]
|
|
2054
|
+
employer employer[]
|
|
2019
2055
|
reminders reminders[]
|
|
2020
2056
|
|
|
2021
2057
|
@@index([mobile], map: "mobile")
|
|
@@ -2055,7 +2091,7 @@ model videokyc {
|
|
|
2055
2091
|
|
|
2056
2092
|
model account_agg {
|
|
2057
2093
|
id Int @id @default(autoincrement())
|
|
2058
|
-
customerId Int
|
|
2094
|
+
customerId Int?
|
|
2059
2095
|
mobileNumber String @db.VarChar(15)
|
|
2060
2096
|
clienttrnxid String? @db.VarChar(100)
|
|
2061
2097
|
txnid String? @db.VarChar(100)
|
|
@@ -2142,31 +2178,29 @@ model reloan_status {
|
|
|
2142
2178
|
}
|
|
2143
2179
|
|
|
2144
2180
|
model lms_users {
|
|
2145
|
-
userID BigInt
|
|
2146
|
-
name String
|
|
2147
|
-
email String
|
|
2148
|
-
mobile_number String?
|
|
2149
|
-
branch String?
|
|
2150
|
-
username String
|
|
2151
|
-
password String
|
|
2152
|
-
role String?
|
|
2153
|
-
status String?
|
|
2154
|
-
created_at DateTime?
|
|
2155
|
-
updated_at DateTime?
|
|
2156
|
-
created_by String?
|
|
2157
|
-
lms_users_permissions lms_users_permissions
|
|
2181
|
+
userID BigInt @id @unique(map: "userID") @default(autoincrement()) @db.UnsignedBigInt
|
|
2182
|
+
name String @db.VarChar(100)
|
|
2183
|
+
email String @unique(map: "email") @db.VarChar(150)
|
|
2184
|
+
mobile_number String? @db.VarChar(15)
|
|
2185
|
+
branch String? @db.VarChar(100)
|
|
2186
|
+
username String @unique(map: "username") @db.VarChar(100)
|
|
2187
|
+
password String @db.VarChar(255)
|
|
2188
|
+
role String? @db.VarChar(50)
|
|
2189
|
+
status String? @default("Active") @db.VarChar(20)
|
|
2190
|
+
created_at DateTime? @default(now()) @db.Timestamp(0)
|
|
2191
|
+
updated_at DateTime? @default(now()) @db.Timestamp(0)
|
|
2192
|
+
created_by String? @db.VarChar(100)
|
|
2193
|
+
lms_users_permissions lms_users_permissions?
|
|
2158
2194
|
}
|
|
2159
2195
|
|
|
2160
2196
|
model lms_users_permissions {
|
|
2161
2197
|
id BigInt @id @default(autoincrement()) @db.UnsignedBigInt
|
|
2162
|
-
user_id BigInt @db.UnsignedBigInt
|
|
2198
|
+
user_id BigInt @unique @db.UnsignedBigInt
|
|
2163
2199
|
sidebar_access Json?
|
|
2164
2200
|
profile_access Json?
|
|
2165
2201
|
created_at DateTime? @default(now()) @db.Timestamp(0)
|
|
2166
2202
|
updated_at DateTime? @default(now()) @db.Timestamp(0)
|
|
2167
2203
|
lms_users lms_users @relation(fields: [user_id], references: [userID], onDelete: Cascade, onUpdate: NoAction, map: "lms_users_permissions_ibfk_1")
|
|
2168
|
-
|
|
2169
|
-
@@index([user_id], map: "user_id")
|
|
2170
2204
|
}
|
|
2171
2205
|
|
|
2172
2206
|
enum usersgoogle_oauth_provider {
|