@factor-wise/prisma-schema 1.0.24 → 1.0.26

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.24",
3
+ "version": "1.0.26",
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,11 @@ model customer {
672
668
  leads leads[]
673
669
  reference reference[]
674
670
  reloan_status reloan_status[]
675
- tempLeads tempLead[]
671
+ templead templead[]
676
672
 
677
673
  @@index([firstName], map: "firstName")
678
674
  @@index([firstName], map: "firstName_2")
679
- @@index([last_login], map: "idx_customer_lastLogin")
675
+ @@index([last_login], map: "idx_customer_lastLogin")
680
676
  @@index([loanApplied], map: "idx_customer_loanApplied")
681
677
  @@index([customerappId], map: "fk_customer_customerapp")
682
678
  }
@@ -1140,9 +1136,9 @@ model leads {
1140
1136
  bankstatement bankstatement[]
1141
1137
  callHistories callhistory[]
1142
1138
  callhistorylogs callhistorylogs[]
1139
+ collections collection[]
1143
1140
  customer customer? @relation(fields: [customerID], references: [customerID])
1144
1141
  loan loan?
1145
- collections collection[]
1146
1142
 
1147
1143
  @@index([customerID], map: "leadcustomerID")
1148
1144
  }
@@ -1313,9 +1309,7 @@ model loan {
1313
1309
  createdDate DateTime @default(now()) @db.DateTime(0)
1314
1310
  allocate_date DateTime? @default(now()) @db.DateTime(0)
1315
1311
  allocated_by String? @db.VarChar(64)
1316
-
1317
-
1318
- lead leads @relation(fields: [leadID], references: [leadID])
1312
+ lead leads @relation(fields: [leadID], references: [leadID])
1319
1313
  }
1320
1314
 
1321
1315
  /// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client.
@@ -1744,7 +1738,7 @@ model reference {
1744
1738
  reference_verify Int @default(0)
1745
1739
  is_verified Int @default(0)
1746
1740
  recording String? @db.Text
1747
- createdByUser lms_users @relation(fields: [createdBy], references: [userID])
1741
+ createdByUser lms_users @relation(fields: [createdBy], references: [userID])
1748
1742
  customer customer @relation(fields: [customerID], references: [customerID])
1749
1743
 
1750
1744
  @@index([createdBy], map: "reference_createdBy_fkey")
@@ -1856,27 +1850,25 @@ model user_ip_details {
1856
1850
 
1857
1851
  /// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client.
1858
1852
  model users {
1859
- userID Int @id @default(autoincrement())
1860
- name String @db.VarChar(100)
1853
+ userID Int @id @default(autoincrement())
1854
+ name String @db.VarChar(100)
1861
1855
  email String
1862
- mobile String @db.VarChar(20)
1863
- did_no String? @db.VarChar(36)
1856
+ mobile String @db.VarChar(20)
1857
+ did_no String? @db.VarChar(36)
1864
1858
  branch String
1865
1859
  userName String
1866
1860
  password String
1867
1861
  role users_role
1868
- status users_status @default(Active)
1862
+ status users_status @default(Active)
1869
1863
  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")
1864
+ createdDate DateTime @default(now()) @db.DateTime(0)
1865
+ accessPer String @db.MediumText
1866
+ utype String @default("ramfin-corp") @db.VarChar(216)
1867
+ firebase_token String? @db.Text
1868
+ device_token String? @db.Text
1869
+ lip String @default("no") @db.VarChar(64)
1870
+ convoque_login_id String? @db.Text
1871
+ convoque_exten String? @db.Text
1880
1872
  reloan_status reloan_status[]
1881
1873
  }
1882
1874
 
@@ -2134,7 +2126,7 @@ model account_agg {
2134
2126
  pushDataReceivedAt DateTime? @db.DateTime(0)
2135
2127
  createdAt DateTime? @default(now()) @db.Timestamp(0)
2136
2128
  processed_data Json?
2137
- latest_bankstatement Int?
2129
+ latest_bankstatement Int?
2138
2130
  }
2139
2131
 
2140
2132
  model cibildata {
@@ -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,35 +2247,36 @@ 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
- customer customer? @relation(fields: [customerID], references: [customerID], onDelete: NoAction, onUpdate: NoAction, map: "bankstatement_ibfk_1")
2272
- leads leads? @relation(fields: [leadID], references: [leadID], onDelete: NoAction, onUpdate: NoAction, map: "bankstatement_ibfk_3")
2273
- 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
+ tempLeadID Int
2254
+ pushData Json?
2255
+ documentFile String? @db.VarChar(255)
2256
+ password String? @db.VarChar(255)
2257
+ status Boolean? @default(false)
2258
+ verifiedBy Int?
2259
+ verifiedDate DateTime? @db.Date
2260
+ uploadBy Int?
2261
+ uploadedDate DateTime? @db.Date
2262
+ analyser_data Json?
2263
+ user_requirement Json?
2264
+ customer customer @relation(fields: [customerID], references: [customerID], onDelete: NoAction, onUpdate: NoAction, map: "bankstatement_ibfk_1")
2265
+ leads leads? @relation(fields: [leadID], references: [leadID], onDelete: NoAction, onUpdate: NoAction, map: "bankstatement_ibfk_3")
2266
+ tempLead templead @relation(fields: [tempLeadID], references: [id], onDelete: NoAction, onUpdate: NoAction, map: "bankstatement_ibfk_4")
2274
2267
 
2275
- @@index([customerID], map: "customerID")
2276
2268
  @@index([leadID], map: "leadID")
2277
2269
  @@index([tempLeadID], map: "tempLeadID")
2270
+ @@index([customerID], map: "bankstatement_ibfk_1")
2278
2271
  }
2279
2272
 
2280
- model tempLead {
2273
+ model templead {
2281
2274
  id Int @id @default(autoincrement())
2282
- customerID Int
2283
2275
  createdAt DateTime @default(now()) @db.Timestamp(0)
2276
+ customerID Int
2284
2277
  updatedAt DateTime @default(now()) @db.Timestamp(0)
2285
2278
  bankstatement bankstatement[]
2286
- customer customer @relation(fields: [customerID], references: [customerID], onDelete: NoAction, onUpdate: NoAction, map: "tempLead_ibfk_1")
2279
+ customer customer @relation(fields: [customerID], references: [customerID], onDelete: NoAction, onUpdate: NoAction, map: "tempLead_ibfk_1")
2287
2280
 
2288
2281
  @@index([customerID], map: "customerID")
2289
2282
  }