@factor-wise/prisma-schema 1.0.25 → 1.0.27

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factor-wise/prisma-schema",
3
- "version": "1.0.25",
3
+ "version": "1.0.27",
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",
@@ -251,13 +251,9 @@ model approval {
251
251
  customerApproval approval_customerApproval @default(ZERO)
252
252
  employmentType String? @db.VarChar(50)
253
253
  disbursalaccountid Int?
254
+ creditedUser lms_users? @relation("ApprovalCreditedByUser", fields: [creditedBy], references: [userID], map: "approval_creditedBy_fkey")
254
255
  lead leads @relation(fields: [leadID], references: [leadID])
255
- creditedUser users? @relation("ApprovalCreditedByUser", fields: [creditedBy], references: [userID], map: "approval_creditedBy_fkey")
256
- sanctionUser users? @relation("ApprovalSanctionByUser", fields: [sanctionalloUID], references: [userID], map: "approval_sanctionBy_fkey")
257
-
258
- // --- Virtual (future) relations with `lms_users` ---
259
- creditedlmsuser lms_users? @relation("ApprovalCreditedByLmsUser", fields: [creditedBy], references: [userID], map: "approval_creditedBy_lms_fkey")
260
- sanctionlmsuser lms_users? @relation("ApprovalSanctionByLmsUser", fields: [sanctionalloUID], references: [userID], map: "approval_sanctionBy_lms_fkey")
256
+ sanctionUser lms_users? @relation("ApprovalSanctionByUser", fields: [sanctionalloUID], references: [userID], map: "approval_sanctionBy_fkey")
261
257
 
262
258
  @@index([leadID], map: "approval_leadID_fkey")
263
259
  @@index([creditedBy], map: "approval_creditedBy_lms_fkey")
@@ -377,7 +373,7 @@ model callhistory {
377
373
  callbackTime DateTime? @db.Date
378
374
  calledBy Int
379
375
  createdDate DateTime @default(now()) @db.DateTime(0)
380
- calledByUser lms_users @relation(fields: [calledBy], references: [userID])
376
+ calledByUser lms_users @relation(fields: [calledBy], references: [userID])
381
377
  lead leads @relation(fields: [leadID], references: [leadID])
382
378
 
383
379
  @@index([calledBy], map: "callhistory_calledBy_fkey")
@@ -399,19 +395,19 @@ model callhistoryapp {
399
395
  }
400
396
 
401
397
  model callhistorylogs {
402
- callHistoryID Int @id @default(autoincrement())
398
+ callHistoryID Int @id @default(autoincrement())
403
399
  customerID Int
404
400
  leadID Int
405
401
  callType String
406
402
  status String
407
- appAmount String? @db.VarChar(216)
408
- noteli String @db.VarChar(512)
403
+ appAmount String? @db.VarChar(216)
404
+ noteli String @db.VarChar(512)
409
405
  remark String
410
- callbackTime DateTime? @db.Date
406
+ callbackTime DateTime? @db.Date
411
407
  calledBy Int?
412
- createdDate DateTime @default(now()) @db.DateTime(0)
413
- calledByUser lms_users? @relation(fields: [calledBy], references: [userID])
414
- lead leads @relation(fields: [leadID], references: [leadID])
408
+ createdDate DateTime @default(now()) @db.DateTime(0)
409
+ calledByUser lms_users? @relation(fields: [calledBy], references: [userID])
410
+ lead leads @relation(fields: [leadID], references: [leadID])
415
411
 
416
412
  @@index([calledBy], map: "callhistorylogs_calledBy_fkey")
417
413
  @@index([leadID], map: "callhistorylogs_leadID_fkey")
@@ -496,7 +492,7 @@ model collection {
496
492
  loanNo String
497
493
  collectedAmount Float
498
494
  penaltyAmount Float?
499
- collectedMode collection_collectedMode @default(NA)
495
+ collectedMode collection_collectedMode @default(NA)
500
496
  collectedDate DateTime @db.Date
501
497
  referenceNo String
502
498
  discountAmount Float @default(0)
@@ -513,7 +509,7 @@ model collection {
513
509
  discount_waiver String? @db.Text
514
510
  discount_waiver_amount String? @db.Text
515
511
  refund_utr_no String? @db.VarChar(256)
516
-
512
+ s3key String?
517
513
  lead leads @relation(fields: [leadID], references: [leadID])
518
514
 
519
515
  @@index([leadID], map: "leadID")
@@ -624,7 +620,7 @@ model customer {
624
620
  middlename String? @db.VarChar(100)
625
621
  lastName String? @db.VarChar(100)
626
622
  fatherName String? @db.VarChar(100)
627
- gender customer_gender? @default(NA)
623
+ gender customer_gender? @default(NA)
628
624
  dob DateTime? @db.Date
629
625
  mobile BigInt
630
626
  email String? @db.VarChar(100)
@@ -642,7 +638,6 @@ model customer {
642
638
  working_since String? @db.Text
643
639
  salary_date String? @db.Text
644
640
  official_email String? @db.Text
645
- companyName String? @db.Text
646
641
  education String? @db.Text
647
642
  pan_cust_verified Int @default(0)
648
643
  dob_digit_match customer_dob_digit_match?
@@ -654,15 +649,16 @@ model customer {
654
649
  customerappId Int?
655
650
  isBlocked Boolean @default(false)
656
651
  utmSource String? @db.VarChar(256)
657
- last_login DateTime @default(now()) @db.Timestamp(0)
658
- loanApplied Boolean @default(false)
659
- is_onboarded Boolean @default(false)
652
+ alternateMobile String? @db.VarChar(50)
653
+ current_address String? @db.Text
660
654
  digioKid String?
661
655
  digioMobileNumber String?
656
+ is_onboarded Boolean @default(false)
657
+ last_login DateTime @default(now()) @db.Timestamp(0)
658
+ loanApplied Boolean @default(false)
662
659
  permanent_address String? @db.Text
663
- current_address String? @db.Text
664
- presalesassign Int?
665
- alternateMobile String? @db.VarChar(50)
660
+ presalesassign Int?
661
+ companyName String? @db.Text
666
662
  addresses address[]
667
663
  bankstatement bankstatement[]
668
664
  customerapp customerapp? @relation(fields: [customerappId], references: [customerID], map: "fk_customer_customerapp")
@@ -672,11 +668,10 @@ model customer {
672
668
  leads leads[]
673
669
  reference reference[]
674
670
  reloan_status reloan_status[]
675
- tempLeads tempLead[]
676
671
 
677
672
  @@index([firstName], map: "firstName")
678
673
  @@index([firstName], map: "firstName_2")
679
- @@index([last_login], map: "idx_customer_lastLogin")
674
+ @@index([last_login], map: "idx_customer_lastLogin")
680
675
  @@index([loanApplied], map: "idx_customer_loanApplied")
681
676
  @@index([customerappId], map: "fk_customer_customerapp")
682
677
  }
@@ -1140,9 +1135,9 @@ model leads {
1140
1135
  bankstatement bankstatement[]
1141
1136
  callHistories callhistory[]
1142
1137
  callhistorylogs callhistorylogs[]
1138
+ collections collection[]
1143
1139
  customer customer? @relation(fields: [customerID], references: [customerID])
1144
1140
  loan loan?
1145
- collections collection[]
1146
1141
 
1147
1142
  @@index([customerID], map: "leadcustomerID")
1148
1143
  }
@@ -1313,9 +1308,7 @@ model loan {
1313
1308
  createdDate DateTime @default(now()) @db.DateTime(0)
1314
1309
  allocate_date DateTime? @default(now()) @db.DateTime(0)
1315
1310
  allocated_by String? @db.VarChar(64)
1316
-
1317
-
1318
- lead leads @relation(fields: [leadID], references: [leadID])
1311
+ lead leads @relation(fields: [leadID], references: [leadID])
1319
1312
  }
1320
1313
 
1321
1314
  /// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client.
@@ -1744,7 +1737,7 @@ model reference {
1744
1737
  reference_verify Int @default(0)
1745
1738
  is_verified Int @default(0)
1746
1739
  recording String? @db.Text
1747
- createdByUser lms_users @relation(fields: [createdBy], references: [userID])
1740
+ createdByUser lms_users @relation(fields: [createdBy], references: [userID])
1748
1741
  customer customer @relation(fields: [customerID], references: [customerID])
1749
1742
 
1750
1743
  @@index([createdBy], map: "reference_createdBy_fkey")
@@ -1856,27 +1849,25 @@ model user_ip_details {
1856
1849
 
1857
1850
  /// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client.
1858
1851
  model users {
1859
- userID Int @id @default(autoincrement())
1860
- name String @db.VarChar(100)
1852
+ userID Int @id @default(autoincrement())
1853
+ name String @db.VarChar(100)
1861
1854
  email String
1862
- mobile String @db.VarChar(20)
1863
- did_no String? @db.VarChar(36)
1855
+ mobile String @db.VarChar(20)
1856
+ did_no String? @db.VarChar(36)
1864
1857
  branch String
1865
1858
  userName String
1866
1859
  password String
1867
1860
  role users_role
1868
- status users_status @default(Active)
1861
+ status users_status @default(Active)
1869
1862
  createdBy Int
1870
- createdDate DateTime @default(now()) @db.DateTime(0)
1871
- accessPer String @db.MediumText
1872
- utype String @default("ramfin-corp") @db.VarChar(216)
1873
- firebase_token String? @db.Text
1874
- device_token String? @db.Text
1875
- lip String @default("no") @db.VarChar(64)
1876
- convoque_login_id String? @db.Text
1877
- convoque_exten String? @db.Text
1878
- approvalsCredited approval[] @relation("ApprovalCreditedByUser")
1879
- approvalsSanctioned approval[] @relation("ApprovalSanctionByUser")
1863
+ createdDate DateTime @default(now()) @db.DateTime(0)
1864
+ accessPer String @db.MediumText
1865
+ utype String @default("ramfin-corp") @db.VarChar(216)
1866
+ firebase_token String? @db.Text
1867
+ device_token String? @db.Text
1868
+ lip String @default("no") @db.VarChar(64)
1869
+ convoque_login_id String? @db.Text
1870
+ convoque_exten String? @db.Text
1880
1871
  reloan_status reloan_status[]
1881
1872
  }
1882
1873
 
@@ -2134,7 +2125,7 @@ model account_agg {
2134
2125
  pushDataReceivedAt DateTime? @db.DateTime(0)
2135
2126
  createdAt DateTime? @default(now()) @db.Timestamp(0)
2136
2127
  processed_data Json?
2137
- latest_bankstatement Int?
2128
+ latest_bankstatement Int?
2138
2129
  }
2139
2130
 
2140
2131
  model cibildata {
@@ -2142,6 +2133,7 @@ model cibildata {
2142
2133
  leadID Int
2143
2134
  requestPayload Json
2144
2135
  responsePayload Json?
2136
+ analyser_data Json?
2145
2137
  status String @default("pending") @db.VarChar(50)
2146
2138
  createdAt DateTime? @default(now()) @db.Timestamp(0)
2147
2139
  updatedAt DateTime? @default(now()) @db.Timestamp(0)
@@ -2219,15 +2211,15 @@ model lms_users {
2219
2211
  password String @db.VarChar(255)
2220
2212
  role String? @db.VarChar(50)
2221
2213
  status String? @default("Active") @db.VarChar(20)
2214
+ created_by String? @db.VarChar(100)
2222
2215
  created_at DateTime? @default(now()) @db.Timestamp(0)
2223
2216
  updated_at DateTime? @default(now()) @db.Timestamp(0)
2224
- created_by String? @db.VarChar(100)
2225
- approvalsCreditedLms approval[] @relation("ApprovalCreditedByLmsUser")
2226
- approvalsSanctionedLms approval[] @relation("ApprovalSanctionByLmsUser")
2227
- callhistory callhistory[]
2228
- callhistorylogs callhistorylogs[]
2229
- reference reference[]
2230
- lms_users_permissions lms_users_permissions?
2217
+ approvalsCredited approval[] @relation("ApprovalCreditedByUser")
2218
+ approvalsSanctioned approval[] @relation("ApprovalSanctionByUser")
2219
+ callhistory callhistory[]
2220
+ callhistorylogs callhistorylogs[]
2221
+ lms_users_permissions lms_users_permissions?
2222
+ reference reference[]
2231
2223
  }
2232
2224
 
2233
2225
  model lms_users_permissions {
@@ -2255,39 +2247,26 @@ model emandate_charge {
2255
2247
  }
2256
2248
 
2257
2249
  model bankstatement {
2258
- id Int @id @default(autoincrement())
2259
- customerID Int
2260
- leadID Int?
2261
- tempLeadID Int
2262
- pushData Json?
2263
- documentFile String? @db.VarChar(255)
2264
- password String? @db.VarChar(255)
2265
- status Boolean? @default(false)
2266
- verifiedBy Int?
2267
- verifiedDate DateTime? @db.Date
2268
- uploadBy Int?
2269
- uploadedDate DateTime? @db.Date
2270
- analyser_data Json?
2271
- user_requirement Json?
2272
- customer customer? @relation(fields: [customerID], references: [customerID], onDelete: NoAction, onUpdate: NoAction, map: "bankstatement_ibfk_1")
2273
- leads leads? @relation(fields: [leadID], references: [leadID], onDelete: NoAction, onUpdate: NoAction, map: "bankstatement_ibfk_3")
2274
- tempLead tempLead @relation(fields: [tempLeadID], references: [id], onDelete: NoAction, onUpdate: NoAction, map: "bankstatement_ibfk_4")
2250
+ id Int @id @default(autoincrement())
2251
+ customerID Int
2252
+ leadID Int?
2253
+ pushData Json?
2254
+ documentFile String? @db.VarChar(255)
2255
+ password String? @db.VarChar(255)
2256
+ status Boolean? @default(false)
2257
+ verifiedBy Int?
2258
+ verifiedDate DateTime? @db.Date
2259
+ uploadBy Int?
2260
+ uploadedDate DateTime? @db.Date
2261
+ analyser_data Json?
2262
+ user_requirement Json?
2263
+ customer customer @relation(fields: [customerID], references: [customerID], onDelete: NoAction, onUpdate: NoAction, map: "bankstatement_ibfk_1")
2264
+ leads leads? @relation(fields: [leadID], references: [leadID], onDelete: NoAction, onUpdate: NoAction, map: "bankstatement_ibfk_3")
2275
2265
 
2276
- @@index([customerID], map: "customerID")
2277
2266
  @@index([leadID], map: "leadID")
2278
- @@index([tempLeadID], map: "tempLeadID")
2267
+ @@index([customerID], map: "bankstatement_ibfk_1")
2279
2268
  }
2280
2269
 
2281
- model tempLead {
2282
- id Int @id @default(autoincrement())
2283
- customerID Int
2284
- createdAt DateTime @default(now()) @db.Timestamp(0)
2285
- updatedAt DateTime @default(now()) @db.Timestamp(0)
2286
- bankstatement bankstatement[]
2287
- customer customer @relation(fields: [customerID], references: [customerID], onDelete: NoAction, onUpdate: NoAction, map: "tempLead_ibfk_1")
2288
-
2289
- @@index([customerID], map: "customerID")
2290
- }
2291
2270
 
2292
2271
  enum usersgoogle_oauth_provider {
2293
2272
  google