@factor-wise/prisma-schema 1.0.6 → 1.0.8
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 +141 -92
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 {
|
|
@@ -879,22 +907,23 @@ model reminders {
|
|
|
879
907
|
}
|
|
880
908
|
|
|
881
909
|
model emandates {
|
|
882
|
-
id Int
|
|
883
|
-
order_id String
|
|
884
|
-
payment_id String?
|
|
885
|
-
customerID String?
|
|
886
|
-
leadID String
|
|
887
|
-
razorpay_customer_id String?
|
|
888
|
-
token_id String?
|
|
889
|
-
auth_type String?
|
|
890
|
-
bank_account String?
|
|
891
|
-
ifsc String?
|
|
892
|
-
status String?
|
|
893
|
-
amount Decimal?
|
|
894
|
-
currency String?
|
|
910
|
+
id Int @id @default(autoincrement()) @db.UnsignedInt
|
|
911
|
+
order_id String @unique(map: "uniq_order") @db.VarChar(100)
|
|
912
|
+
payment_id String? @db.VarChar(100)
|
|
913
|
+
customerID String? @db.VarChar(100)
|
|
914
|
+
leadID String @db.VarChar(100)
|
|
915
|
+
razorpay_customer_id String? @db.VarChar(100)
|
|
916
|
+
token_id String? @db.VarChar(100)
|
|
917
|
+
auth_type String? @db.VarChar(50)
|
|
918
|
+
bank_account String? @db.VarChar(50)
|
|
919
|
+
ifsc String? @db.VarChar(20)
|
|
920
|
+
status String? @db.VarChar(50)
|
|
921
|
+
amount Decimal? @db.Decimal(10, 2)
|
|
922
|
+
currency String? @default("INR") @db.VarChar(10)
|
|
895
923
|
response_json Json?
|
|
896
|
-
created_at DateTime?
|
|
897
|
-
updated_at DateTime?
|
|
924
|
+
created_at DateTime? @default(now()) @db.DateTime(0)
|
|
925
|
+
updated_at DateTime? @default(now()) @db.DateTime(0)
|
|
926
|
+
emandate_charge emandate_charge[]
|
|
898
927
|
}
|
|
899
928
|
|
|
900
929
|
model cibildata_archive {
|
|
@@ -1049,19 +1078,19 @@ model eagreement {
|
|
|
1049
1078
|
|
|
1050
1079
|
/// 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
1080
|
model leads {
|
|
1052
|
-
leadID Int
|
|
1081
|
+
leadID Int @id @default(autoincrement())
|
|
1053
1082
|
customerID Int?
|
|
1054
1083
|
userID Int?
|
|
1055
|
-
purpose String?
|
|
1056
|
-
loanRequeried Float
|
|
1057
|
-
tenure Int
|
|
1084
|
+
purpose String? @db.VarChar(255)
|
|
1085
|
+
loanRequeried Float @default(10000)
|
|
1086
|
+
tenure Int @default(5)
|
|
1058
1087
|
monthlyIncome Float
|
|
1059
|
-
salaryMode String?
|
|
1060
|
-
city String?
|
|
1088
|
+
salaryMode String? @db.VarChar(200)
|
|
1089
|
+
city String? @db.VarChar(255)
|
|
1061
1090
|
state String?
|
|
1062
1091
|
pincode BigInt
|
|
1063
1092
|
status leads_status
|
|
1064
|
-
utmSource String
|
|
1093
|
+
utmSource String @default("Website") @db.VarChar(100)
|
|
1065
1094
|
fbLeads String?
|
|
1066
1095
|
domainName String?
|
|
1067
1096
|
commingLeadsDate String?
|
|
@@ -1069,23 +1098,23 @@ model leads {
|
|
|
1069
1098
|
callAssign Int
|
|
1070
1099
|
creditAssign Int
|
|
1071
1100
|
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
|
|
1101
|
+
createdDate DateTime @default(now()) @db.Timestamp(0)
|
|
1102
|
+
alloUID String @default("no") @db.VarChar(216)
|
|
1103
|
+
sanctionalloUID String @default("no") @db.VarChar(216)
|
|
1104
|
+
sanctionAppID String @default("no") @db.VarChar(216)
|
|
1105
|
+
entity_id String? @db.Text
|
|
1106
|
+
field_officer_id String? @db.Text
|
|
1107
|
+
field_officer_assign_date String? @db.Text
|
|
1108
|
+
field_officer_lead_status Int @default(0)
|
|
1080
1109
|
em_id BigInt?
|
|
1081
|
-
step String?
|
|
1082
|
-
kfs leads_kfs
|
|
1083
|
-
bureau_consent Int
|
|
1084
|
-
emandatebypass Boolean?
|
|
1085
|
-
|
|
1110
|
+
step String? @db.Text
|
|
1111
|
+
kfs leads_kfs @default(ZERO)
|
|
1112
|
+
bureau_consent Int @default(0)
|
|
1113
|
+
emandatebypass Boolean? @default(false)
|
|
1114
|
+
approvals approval[]
|
|
1086
1115
|
callHistories callhistory[]
|
|
1087
1116
|
callhistorylogs callhistorylogs[]
|
|
1088
|
-
|
|
1117
|
+
customer customer? @relation(fields: [customerID], references: [customerID])
|
|
1089
1118
|
|
|
1090
1119
|
@@index([customerID], map: "leadcustomerID")
|
|
1091
1120
|
}
|
|
@@ -1684,8 +1713,11 @@ model reference {
|
|
|
1684
1713
|
reference_verify Int @default(0)
|
|
1685
1714
|
is_verified Int @default(0)
|
|
1686
1715
|
recording String? @db.Text
|
|
1687
|
-
customer customer @relation(fields: [customerID], references: [customerID])
|
|
1688
1716
|
createdByUser users @relation(fields: [createdBy], references: [userID])
|
|
1717
|
+
customer customer @relation(fields: [customerID], references: [customerID])
|
|
1718
|
+
|
|
1719
|
+
@@index([createdBy], map: "reference_createdBy_fkey")
|
|
1720
|
+
@@index([customerID], map: "reference_customerID_fkey")
|
|
1689
1721
|
}
|
|
1690
1722
|
|
|
1691
1723
|
/// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client.
|
|
@@ -1793,29 +1825,29 @@ model user_ip_details {
|
|
|
1793
1825
|
|
|
1794
1826
|
/// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client.
|
|
1795
1827
|
model users {
|
|
1796
|
-
userID Int
|
|
1797
|
-
name String
|
|
1828
|
+
userID Int @id @default(autoincrement())
|
|
1829
|
+
name String @db.VarChar(100)
|
|
1798
1830
|
email String
|
|
1799
|
-
mobile String
|
|
1800
|
-
did_no String?
|
|
1831
|
+
mobile String @db.VarChar(20)
|
|
1832
|
+
did_no String? @db.VarChar(36)
|
|
1801
1833
|
branch String
|
|
1802
1834
|
userName String
|
|
1803
1835
|
password String
|
|
1804
1836
|
role users_role
|
|
1805
|
-
status users_status
|
|
1837
|
+
status users_status @default(Active)
|
|
1806
1838
|
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[]
|
|
1839
|
+
createdDate DateTime @default(now()) @db.DateTime(0)
|
|
1840
|
+
accessPer String @db.MediumText
|
|
1841
|
+
utype String @default("ramfin-corp") @db.VarChar(216)
|
|
1842
|
+
firebase_token String? @db.Text
|
|
1843
|
+
device_token String? @db.Text
|
|
1844
|
+
lip String @default("no") @db.VarChar(64)
|
|
1845
|
+
convoque_login_id String? @db.Text
|
|
1846
|
+
convoque_exten String? @db.Text
|
|
1817
1847
|
callhistory callhistory[]
|
|
1818
1848
|
callhistorylogs callhistorylogs[]
|
|
1849
|
+
reference reference[]
|
|
1850
|
+
reloan_status reloan_status[]
|
|
1819
1851
|
}
|
|
1820
1852
|
|
|
1821
1853
|
/// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client.
|
|
@@ -2016,6 +2048,11 @@ model customerapp {
|
|
|
2016
2048
|
bureau_consent Int @default(0)
|
|
2017
2049
|
token String?
|
|
2018
2050
|
presalesassign Int
|
|
2051
|
+
address address[]
|
|
2052
|
+
customer customer[]
|
|
2053
|
+
customeraccount customeraccount[]
|
|
2054
|
+
document document[]
|
|
2055
|
+
employer employer[]
|
|
2019
2056
|
reminders reminders[]
|
|
2020
2057
|
|
|
2021
2058
|
@@index([mobile], map: "mobile")
|
|
@@ -2055,7 +2092,7 @@ model videokyc {
|
|
|
2055
2092
|
|
|
2056
2093
|
model account_agg {
|
|
2057
2094
|
id Int @id @default(autoincrement())
|
|
2058
|
-
customerId Int
|
|
2095
|
+
customerId Int?
|
|
2059
2096
|
mobileNumber String @db.VarChar(15)
|
|
2060
2097
|
clienttrnxid String? @db.VarChar(100)
|
|
2061
2098
|
txnid String? @db.VarChar(100)
|
|
@@ -2142,19 +2179,19 @@ model reloan_status {
|
|
|
2142
2179
|
}
|
|
2143
2180
|
|
|
2144
2181
|
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
|
|
2182
|
+
userID BigInt @id @unique(map: "userID") @default(autoincrement()) @db.UnsignedBigInt
|
|
2183
|
+
name String @db.VarChar(100)
|
|
2184
|
+
email String @unique(map: "email") @db.VarChar(150)
|
|
2185
|
+
mobile_number String? @db.VarChar(15)
|
|
2186
|
+
branch String? @db.VarChar(100)
|
|
2187
|
+
username String @unique(map: "username") @db.VarChar(100)
|
|
2188
|
+
password String @db.VarChar(255)
|
|
2189
|
+
role String? @db.VarChar(50)
|
|
2190
|
+
status String? @default("Active") @db.VarChar(20)
|
|
2191
|
+
created_at DateTime? @default(now()) @db.Timestamp(0)
|
|
2192
|
+
updated_at DateTime? @default(now()) @db.Timestamp(0)
|
|
2193
|
+
created_by String? @db.VarChar(100)
|
|
2194
|
+
lms_users_permissions lms_users_permissions?
|
|
2158
2195
|
}
|
|
2159
2196
|
|
|
2160
2197
|
model lms_users_permissions {
|
|
@@ -2165,8 +2202,20 @@ model lms_users_permissions {
|
|
|
2165
2202
|
created_at DateTime? @default(now()) @db.Timestamp(0)
|
|
2166
2203
|
updated_at DateTime? @default(now()) @db.Timestamp(0)
|
|
2167
2204
|
lms_users lms_users @relation(fields: [user_id], references: [userID], onDelete: Cascade, onUpdate: NoAction, map: "lms_users_permissions_ibfk_1")
|
|
2205
|
+
}
|
|
2168
2206
|
|
|
2169
|
-
|
|
2207
|
+
model emandate_charge {
|
|
2208
|
+
id Int @id @default(autoincrement()) @db.UnsignedInt
|
|
2209
|
+
emandate_id Int @db.UnsignedInt
|
|
2210
|
+
order_id String @db.VarChar(255)
|
|
2211
|
+
amount Decimal @db.Decimal(15, 2)
|
|
2212
|
+
razorpay_payment_id String? @db.VarChar(255)
|
|
2213
|
+
response Json?
|
|
2214
|
+
created_at DateTime? @default(now()) @db.Timestamp(0)
|
|
2215
|
+
updated_at DateTime? @default(now()) @db.Timestamp(0)
|
|
2216
|
+
emandates emandates @relation(fields: [emandate_id], references: [id], onDelete: Cascade, map: "fk_emandate_charge_emandate")
|
|
2217
|
+
|
|
2218
|
+
@@index([emandate_id], map: "fk_emandate_charge_emandate")
|
|
2170
2219
|
}
|
|
2171
2220
|
|
|
2172
2221
|
enum usersgoogle_oauth_provider {
|