@factor-wise/prisma-schema 1.0.9 → 1.0.11

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.9",
3
+ "version": "1.0.11",
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",
@@ -247,21 +247,21 @@ model approval {
247
247
  documentr String? @db.VarChar(512)
248
248
  redFlag String?
249
249
  createdDate DateTime @default(now()) @db.DateTime(0)
250
- sanctionalloUID Int?
250
+ sanctionalloUID Int?
251
251
  customerApproval approval_customerApproval @default(ZERO)
252
252
  employmentType String? @db.VarChar(50)
253
253
  disbursalaccountid Int?
254
254
  lead leads @relation(fields: [leadID], references: [leadID])
255
-
256
- // --- Real enforced relations with `users` ---
257
- creditedUser users? @relation("ApprovalCreditedByUser", fields: [creditedBy], references: [userID], map: "approval_creditedBy_fkey")
258
- sanctionUser users? @relation("ApprovalSanctionByUser", fields: [sanctionalloUID], references: [userID], map: "approval_sanctionBy_fkey")
259
-
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
+
260
258
  // --- Virtual (future) relations with `lms_users` ---
261
- creditedLmsUser lms_users? @relation("ApprovalCreditedByLmsUser", fields: [creditedBy], references: [userID], map: "approval_creditedBy_lms_fkey")
262
- sanctionLmsUser lms_users? @relation("ApprovalSanctionByLmsUser", fields: [sanctionalloUID], references: [userID], map: "approval_sanctionBy_lms_fkey")
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")
263
261
 
264
262
  @@index([leadID], map: "approval_leadID_fkey")
263
+ @@index([creditedBy], map: "approval_creditedBy_lms_fkey")
264
+ @@index([sanctionalloUID], map: "approval_sanctionBy_lms_fkey")
265
265
  }
266
266
 
267
267
  model appvedio {
@@ -377,7 +377,7 @@ model callhistory {
377
377
  callbackTime DateTime? @db.Date
378
378
  calledBy Int
379
379
  createdDate DateTime @default(now()) @db.DateTime(0)
380
- calledByUser users @relation(fields: [calledBy], references: [userID])
380
+ calledByUser lms_users @relation(fields: [calledBy], references: [userID])
381
381
  lead leads @relation(fields: [leadID], references: [leadID])
382
382
 
383
383
  @@index([calledBy], map: "callhistory_calledBy_fkey")
@@ -410,7 +410,7 @@ model callhistorylogs {
410
410
  callbackTime DateTime? @db.Date
411
411
  calledBy Int?
412
412
  createdDate DateTime @default(now()) @db.DateTime(0)
413
- calledByUser users? @relation(fields: [calledBy], references: [userID])
413
+ calledByUser lms_users? @relation(fields: [calledBy], references: [userID])
414
414
  lead leads @relation(fields: [leadID], references: [leadID])
415
415
 
416
416
  @@index([calledBy], map: "callhistorylogs_calledBy_fkey")
@@ -651,6 +651,7 @@ model customer {
651
651
  customerappId Int?
652
652
  isBlocked Boolean @default(false)
653
653
  addresses address[]
654
+ bankstatement bankstatement[]
654
655
  customerapp customerapp? @relation(fields: [customerappId], references: [customerID], map: "fk_customer_customerapp")
655
656
  accounts customeraccount[]
656
657
  document document[]
@@ -1120,9 +1121,11 @@ model leads {
1120
1121
  bureau_consent Int @default(0)
1121
1122
  emandatebypass Boolean? @default(false)
1122
1123
  approvals approval[]
1124
+ bankstatement bankstatement[]
1123
1125
  callHistories callhistory[]
1124
1126
  callhistorylogs callhistorylogs[]
1125
1127
  customer customer? @relation(fields: [customerID], references: [customerID])
1128
+ loan loan?
1126
1129
 
1127
1130
  @@index([customerID], map: "leadcustomerID")
1128
1131
  }
@@ -1268,7 +1271,7 @@ model legal_notices {
1268
1271
  model loan {
1269
1272
  id Int @id @default(autoincrement())
1270
1273
  loanID Int
1271
- leadID Int
1274
+ leadID Int @unique
1272
1275
  loanNo String
1273
1276
  customerID Int?
1274
1277
  disbursalAmount Float
@@ -1289,10 +1292,13 @@ model loan {
1289
1292
  rejReason String? @db.VarChar(256)
1290
1293
  companyAccountNo String @default("")
1291
1294
  ip String @db.VarChar(100)
1292
- disbursedBy Int
1295
+ disbursedBy Int?
1293
1296
  createdDate DateTime @default(now()) @db.DateTime(0)
1294
1297
  allocate_date DateTime? @default(now()) @db.DateTime(0)
1295
1298
  allocated_by String? @db.VarChar(64)
1299
+
1300
+
1301
+ lead leads @relation(fields: [leadID], references: [leadID])
1296
1302
  }
1297
1303
 
1298
1304
  /// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client.
@@ -1721,7 +1727,7 @@ model reference {
1721
1727
  reference_verify Int @default(0)
1722
1728
  is_verified Int @default(0)
1723
1729
  recording String? @db.Text
1724
- createdByUser users @relation(fields: [createdBy], references: [userID])
1730
+ createdByUser lms_users @relation(fields: [createdBy], references: [userID])
1725
1731
  customer customer @relation(fields: [customerID], references: [customerID])
1726
1732
 
1727
1733
  @@index([createdBy], map: "reference_createdBy_fkey")
@@ -1833,31 +1839,28 @@ model user_ip_details {
1833
1839
 
1834
1840
  /// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client.
1835
1841
  model users {
1836
- userID Int @id @default(autoincrement())
1837
- name String @db.VarChar(100)
1838
- email String
1839
- mobile String @db.VarChar(20)
1840
- did_no String? @db.VarChar(36)
1841
- branch String
1842
- userName String
1843
- password String
1844
- role users_role
1845
- status users_status @default(Active)
1846
- createdBy Int
1847
- createdDate DateTime @default(now()) @db.DateTime(0)
1848
- accessPer String @db.MediumText
1849
- utype String @default("ramfin-corp") @db.VarChar(216)
1850
- firebase_token String? @db.Text
1851
- device_token String? @db.Text
1852
- lip String @default("no") @db.VarChar(64)
1853
- convoque_login_id String? @db.Text
1854
- convoque_exten String? @db.Text
1855
- callhistory callhistory[]
1856
- callhistorylogs callhistorylogs[]
1857
- reference reference[]
1858
- reloan_status reloan_status[]
1859
- approvalsCredited approval[] @relation("ApprovalCreditedByUser")
1860
- approvalsSanctioned approval[] @relation("ApprovalSanctionByUser")
1842
+ userID Int @id @default(autoincrement())
1843
+ name String @db.VarChar(100)
1844
+ email String
1845
+ mobile String @db.VarChar(20)
1846
+ did_no String? @db.VarChar(36)
1847
+ branch String
1848
+ userName String
1849
+ password String
1850
+ role users_role
1851
+ status users_status @default(Active)
1852
+ createdBy Int
1853
+ createdDate DateTime @default(now()) @db.DateTime(0)
1854
+ accessPer String @db.MediumText
1855
+ utype String @default("ramfin-corp") @db.VarChar(216)
1856
+ firebase_token String? @db.Text
1857
+ device_token String? @db.Text
1858
+ lip String @default("no") @db.VarChar(64)
1859
+ convoque_login_id String? @db.Text
1860
+ convoque_exten String? @db.Text
1861
+ approvalsCredited approval[] @relation("ApprovalCreditedByUser")
1862
+ approvalsSanctioned approval[] @relation("ApprovalSanctionByUser")
1863
+ reloan_status reloan_status[]
1861
1864
  }
1862
1865
 
1863
1866
  /// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client.
@@ -2059,11 +2062,13 @@ model customerapp {
2059
2062
  token String?
2060
2063
  presalesassign Int
2061
2064
  address address[]
2065
+ bankstatement bankstatement[]
2062
2066
  customer customer[]
2063
2067
  customeraccount customeraccount[]
2064
2068
  document document[]
2065
2069
  employer employer[]
2066
2070
  reminders reminders[]
2071
+ tempLead tempLead[]
2067
2072
 
2068
2073
  @@index([mobile], map: "mobile")
2069
2074
  @@index([last_login], map: "idx_customer_lastLogin")
@@ -2189,7 +2194,7 @@ model reloan_status {
2189
2194
  }
2190
2195
 
2191
2196
  model lms_users {
2192
- userID Int @id @unique(map: "userID") @default(autoincrement())
2197
+ userID Int @id @unique(map: "userID") @default(autoincrement())
2193
2198
  name String @db.VarChar(100)
2194
2199
  email String @unique(map: "email") @db.VarChar(150)
2195
2200
  mobile_number String? @db.VarChar(15)
@@ -2201,15 +2206,17 @@ model lms_users {
2201
2206
  created_at DateTime? @default(now()) @db.Timestamp(0)
2202
2207
  updated_at DateTime? @default(now()) @db.Timestamp(0)
2203
2208
  created_by String? @db.VarChar(100)
2204
- lms_users_permissions lms_users_permissions?
2205
-
2206
2209
  approvalsCreditedLms approval[] @relation("ApprovalCreditedByLmsUser")
2207
2210
  approvalsSanctionedLms approval[] @relation("ApprovalSanctionByLmsUser")
2211
+ callhistory callhistory[]
2212
+ callhistorylogs callhistorylogs[]
2213
+ reference reference[]
2214
+ lms_users_permissions lms_users_permissions?
2208
2215
  }
2209
2216
 
2210
2217
  model lms_users_permissions {
2211
2218
  id BigInt @id @default(autoincrement()) @db.UnsignedBigInt
2212
- user_id Int @unique
2219
+ user_id Int @unique
2213
2220
  sidebar_access Json?
2214
2221
  profile_access Json?
2215
2222
  created_at DateTime? @default(now()) @db.Timestamp(0)
@@ -2231,6 +2238,40 @@ model emandate_charge {
2231
2238
  @@index([emandate_id], map: "fk_emandate_charge_emandate")
2232
2239
  }
2233
2240
 
2241
+ model bankstatement {
2242
+ id Int @id @default(autoincrement())
2243
+ customerID Int?
2244
+ customerappID Int
2245
+ leadID Int?
2246
+ tempLeadID Int
2247
+ pushData Json?
2248
+ documentFile String? @db.VarChar(255)
2249
+ password String? @db.VarChar(255)
2250
+ status Boolean? @default(false)
2251
+ verifiedBy Int?
2252
+ verifiedDate DateTime? @db.Date
2253
+ uploadBy Int?
2254
+ uploadedDate DateTime? @db.Date
2255
+ customer customer? @relation(fields: [customerID], references: [customerID], onDelete: NoAction, onUpdate: NoAction, map: "bankstatement_ibfk_1")
2256
+ customerapp customerapp @relation(fields: [customerappID], references: [customerID], onDelete: NoAction, onUpdate: NoAction, map: "bankstatement_ibfk_2")
2257
+ leads leads? @relation(fields: [leadID], references: [leadID], onDelete: NoAction, onUpdate: NoAction, map: "bankstatement_ibfk_3")
2258
+ tempLead tempLead @relation(fields: [tempLeadID], references: [id], onDelete: NoAction, onUpdate: NoAction, map: "bankstatement_ibfk_4")
2259
+
2260
+ @@index([customerID], map: "customerID")
2261
+ @@index([customerappID], map: "customerappID")
2262
+ @@index([leadID], map: "leadID")
2263
+ @@index([tempLeadID], map: "tempLeadID")
2264
+ }
2265
+
2266
+ model tempLead {
2267
+ id Int @id @default(autoincrement())
2268
+ customerappID Int
2269
+ bankstatement bankstatement[]
2270
+ customerapp customerapp @relation(fields: [customerappID], references: [customerID], onDelete: NoAction, onUpdate: NoAction, map: "tempLead_ibfk_1")
2271
+
2272
+ @@index([customerappID], map: "customerappID")
2273
+ }
2274
+
2234
2275
  enum usersgoogle_oauth_provider {
2235
2276
  google
2236
2277
  facebook