@factor-wise/prisma-schema 1.0.9 → 1.0.10

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.10",
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 {
@@ -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,6 +1121,7 @@ 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])
@@ -1833,31 +1835,31 @@ model user_ip_details {
1833
1835
 
1834
1836
  /// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client.
1835
1837
  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")
1838
+ userID Int @id @default(autoincrement())
1839
+ name String @db.VarChar(100)
1840
+ email String
1841
+ mobile String @db.VarChar(20)
1842
+ did_no String? @db.VarChar(36)
1843
+ branch String
1844
+ userName String
1845
+ password String
1846
+ role users_role
1847
+ status users_status @default(Active)
1848
+ createdBy Int
1849
+ createdDate DateTime @default(now()) @db.DateTime(0)
1850
+ accessPer String @db.MediumText
1851
+ utype String @default("ramfin-corp") @db.VarChar(216)
1852
+ firebase_token String? @db.Text
1853
+ device_token String? @db.Text
1854
+ lip String @default("no") @db.VarChar(64)
1855
+ convoque_login_id String? @db.Text
1856
+ convoque_exten String? @db.Text
1857
+ approvalsCredited approval[] @relation("ApprovalCreditedByUser")
1858
+ approvalsSanctioned approval[] @relation("ApprovalSanctionByUser")
1859
+ callhistory callhistory[]
1860
+ callhistorylogs callhistorylogs[]
1861
+ reference reference[]
1862
+ reloan_status reloan_status[]
1861
1863
  }
1862
1864
 
1863
1865
  /// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client.
@@ -2059,11 +2061,13 @@ model customerapp {
2059
2061
  token String?
2060
2062
  presalesassign Int
2061
2063
  address address[]
2064
+ bankstatement bankstatement[]
2062
2065
  customer customer[]
2063
2066
  customeraccount customeraccount[]
2064
2067
  document document[]
2065
2068
  employer employer[]
2066
2069
  reminders reminders[]
2070
+ tempLead tempLead[]
2067
2071
 
2068
2072
  @@index([mobile], map: "mobile")
2069
2073
  @@index([last_login], map: "idx_customer_lastLogin")
@@ -2189,7 +2193,7 @@ model reloan_status {
2189
2193
  }
2190
2194
 
2191
2195
  model lms_users {
2192
- userID Int @id @unique(map: "userID") @default(autoincrement())
2196
+ userID Int @id @unique(map: "userID") @default(autoincrement())
2193
2197
  name String @db.VarChar(100)
2194
2198
  email String @unique(map: "email") @db.VarChar(150)
2195
2199
  mobile_number String? @db.VarChar(15)
@@ -2201,15 +2205,14 @@ model lms_users {
2201
2205
  created_at DateTime? @default(now()) @db.Timestamp(0)
2202
2206
  updated_at DateTime? @default(now()) @db.Timestamp(0)
2203
2207
  created_by String? @db.VarChar(100)
2204
- lms_users_permissions lms_users_permissions?
2205
-
2206
2208
  approvalsCreditedLms approval[] @relation("ApprovalCreditedByLmsUser")
2207
2209
  approvalsSanctionedLms approval[] @relation("ApprovalSanctionByLmsUser")
2210
+ lms_users_permissions lms_users_permissions?
2208
2211
  }
2209
2212
 
2210
2213
  model lms_users_permissions {
2211
2214
  id BigInt @id @default(autoincrement()) @db.UnsignedBigInt
2212
- user_id Int @unique
2215
+ user_id Int @unique
2213
2216
  sidebar_access Json?
2214
2217
  profile_access Json?
2215
2218
  created_at DateTime? @default(now()) @db.Timestamp(0)
@@ -2231,6 +2234,40 @@ model emandate_charge {
2231
2234
  @@index([emandate_id], map: "fk_emandate_charge_emandate")
2232
2235
  }
2233
2236
 
2237
+ model bankstatement {
2238
+ id Int @id @default(autoincrement())
2239
+ customerID Int?
2240
+ customerappID Int
2241
+ leadID Int?
2242
+ tempLeadID Int
2243
+ pushData Json?
2244
+ documentFile String? @db.VarChar(255)
2245
+ password String? @db.VarChar(255)
2246
+ status Boolean? @default(false)
2247
+ verifiedBy Int?
2248
+ verifiedDate DateTime? @db.Date
2249
+ uploadBy Int?
2250
+ uploadedDate DateTime? @db.Date
2251
+ customer customer? @relation(fields: [customerID], references: [customerID], onDelete: NoAction, onUpdate: NoAction, map: "bankstatement_ibfk_1")
2252
+ customerapp customerapp @relation(fields: [customerappID], references: [customerID], onDelete: NoAction, onUpdate: NoAction, map: "bankstatement_ibfk_2")
2253
+ leads leads? @relation(fields: [leadID], references: [leadID], onDelete: NoAction, onUpdate: NoAction, map: "bankstatement_ibfk_3")
2254
+ tempLead tempLead @relation(fields: [tempLeadID], references: [id], onDelete: NoAction, onUpdate: NoAction, map: "bankstatement_ibfk_4")
2255
+
2256
+ @@index([customerID], map: "customerID")
2257
+ @@index([customerappID], map: "customerappID")
2258
+ @@index([leadID], map: "leadID")
2259
+ @@index([tempLeadID], map: "tempLeadID")
2260
+ }
2261
+
2262
+ model tempLead {
2263
+ id Int @id @default(autoincrement())
2264
+ customerappID Int
2265
+ bankstatement bankstatement[]
2266
+ customerapp customerapp @relation(fields: [customerappID], references: [customerID], onDelete: NoAction, onUpdate: NoAction, map: "tempLead_ibfk_1")
2267
+
2268
+ @@index([customerappID], map: "customerappID")
2269
+ }
2270
+
2234
2271
  enum usersgoogle_oauth_provider {
2235
2272
  google
2236
2273
  facebook