@factor-wise/prisma-schema 1.0.8 → 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.8",
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",
@@ -242,18 +242,26 @@ model approval {
242
242
  employed String?
243
243
  remark String?
244
244
  loanRequirePurpose String?
245
- creditedBy Int
245
+ creditedBy Int?
246
246
  rejectionReason String?
247
247
  documentr String? @db.VarChar(512)
248
248
  redFlag String?
249
249
  createdDate DateTime @default(now()) @db.DateTime(0)
250
- sanctionalloUID String? @default("no") @db.VarChar(216)
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
+ 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")
255
261
 
256
262
  @@index([leadID], map: "approval_leadID_fkey")
263
+ @@index([creditedBy], map: "approval_creditedBy_lms_fkey")
264
+ @@index([sanctionalloUID], map: "approval_sanctionBy_lms_fkey")
257
265
  }
258
266
 
259
267
  model appvedio {
@@ -643,6 +651,7 @@ model customer {
643
651
  customerappId Int?
644
652
  isBlocked Boolean @default(false)
645
653
  addresses address[]
654
+ bankstatement bankstatement[]
646
655
  customerapp customerapp? @relation(fields: [customerappId], references: [customerID], map: "fk_customer_customerapp")
647
656
  accounts customeraccount[]
648
657
  document document[]
@@ -1112,6 +1121,7 @@ model leads {
1112
1121
  bureau_consent Int @default(0)
1113
1122
  emandatebypass Boolean? @default(false)
1114
1123
  approvals approval[]
1124
+ bankstatement bankstatement[]
1115
1125
  callHistories callhistory[]
1116
1126
  callhistorylogs callhistorylogs[]
1117
1127
  customer customer? @relation(fields: [customerID], references: [customerID])
@@ -1825,29 +1835,31 @@ model user_ip_details {
1825
1835
 
1826
1836
  /// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client.
1827
1837
  model users {
1828
- userID Int @id @default(autoincrement())
1829
- name String @db.VarChar(100)
1830
- email String
1831
- mobile String @db.VarChar(20)
1832
- did_no String? @db.VarChar(36)
1833
- branch String
1834
- userName String
1835
- password String
1836
- role users_role
1837
- status users_status @default(Active)
1838
- createdBy Int
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
1847
- callhistory callhistory[]
1848
- callhistorylogs callhistorylogs[]
1849
- reference reference[]
1850
- reloan_status reloan_status[]
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[]
1851
1863
  }
1852
1864
 
1853
1865
  /// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client.
@@ -2049,11 +2061,13 @@ model customerapp {
2049
2061
  token String?
2050
2062
  presalesassign Int
2051
2063
  address address[]
2064
+ bankstatement bankstatement[]
2052
2065
  customer customer[]
2053
2066
  customeraccount customeraccount[]
2054
2067
  document document[]
2055
2068
  employer employer[]
2056
2069
  reminders reminders[]
2070
+ tempLead tempLead[]
2057
2071
 
2058
2072
  @@index([mobile], map: "mobile")
2059
2073
  @@index([last_login], map: "idx_customer_lastLogin")
@@ -2179,7 +2193,7 @@ model reloan_status {
2179
2193
  }
2180
2194
 
2181
2195
  model lms_users {
2182
- userID BigInt @id @unique(map: "userID") @default(autoincrement()) @db.UnsignedBigInt
2196
+ userID Int @id @unique(map: "userID") @default(autoincrement())
2183
2197
  name String @db.VarChar(100)
2184
2198
  email String @unique(map: "email") @db.VarChar(150)
2185
2199
  mobile_number String? @db.VarChar(15)
@@ -2191,12 +2205,14 @@ model lms_users {
2191
2205
  created_at DateTime? @default(now()) @db.Timestamp(0)
2192
2206
  updated_at DateTime? @default(now()) @db.Timestamp(0)
2193
2207
  created_by String? @db.VarChar(100)
2208
+ approvalsCreditedLms approval[] @relation("ApprovalCreditedByLmsUser")
2209
+ approvalsSanctionedLms approval[] @relation("ApprovalSanctionByLmsUser")
2194
2210
  lms_users_permissions lms_users_permissions?
2195
2211
  }
2196
2212
 
2197
2213
  model lms_users_permissions {
2198
2214
  id BigInt @id @default(autoincrement()) @db.UnsignedBigInt
2199
- user_id BigInt @unique @db.UnsignedBigInt
2215
+ user_id Int @unique
2200
2216
  sidebar_access Json?
2201
2217
  profile_access Json?
2202
2218
  created_at DateTime? @default(now()) @db.Timestamp(0)
@@ -2218,6 +2234,40 @@ model emandate_charge {
2218
2234
  @@index([emandate_id], map: "fk_emandate_charge_emandate")
2219
2235
  }
2220
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
+
2221
2271
  enum usersgoogle_oauth_provider {
2222
2272
  google
2223
2273
  facebook