@factor-wise/prisma-schema 1.0.29 → 2.0.2

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.29",
3
+ "version": "2.0.2",
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",
@@ -29,6 +29,7 @@
29
29
  "@prisma/client": "^6.19.0"
30
30
  },
31
31
  "devDependencies": {
32
+ "@types/node": "^25.0.3",
32
33
  "prisma": "^6.19.0"
33
34
  }
34
35
  }
@@ -534,6 +534,12 @@ model collectionfollowup {
534
534
  createdDate DateTime @default(now()) @db.Timestamp(0)
535
535
  followup_type Int @default(0)
536
536
  reason String? @db.Text
537
+
538
+ lead leads @relation(fields: [leadID], references: [leadID], onDelete: Cascade)
539
+ loan loan @relation(fields: [loanNo], references: [loanNo], onDelete: Cascade)
540
+
541
+ @@index([leadID])
542
+ @@index([loanNo])
537
543
  }
538
544
 
539
545
  model collectionrefund {
@@ -688,6 +694,8 @@ model customer_credit_remarks {
688
694
  creditRemark String @db.Text
689
695
  createdBy Int
690
696
  createdDate DateTime? @default(now()) @db.DateTime(0)
697
+ lead leads @relation(fields: [leadID], references: [leadID])
698
+ @@index([leadID], map: "approval_leadID_fkey")
691
699
  }
692
700
 
693
701
  /// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
@@ -1144,6 +1152,9 @@ model leads {
1144
1152
  collections collection[]
1145
1153
  customer customer? @relation(fields: [customerID], references: [customerID])
1146
1154
  loan loan?
1155
+ collectionFollowups collectionfollowup[]
1156
+ creditRemarks customer_credit_remarks[]
1157
+
1147
1158
 
1148
1159
  @@index([customerID], map: "leadcustomerID")
1149
1160
  }
@@ -1290,7 +1301,7 @@ model loan {
1290
1301
  id Int @id @default(autoincrement())
1291
1302
  loanID Int
1292
1303
  leadID Int @unique
1293
- loanNo String
1304
+ loanNo String @unique
1294
1305
  customerID Int?
1295
1306
  disbursalAmount Float
1296
1307
  disbursalDate String? @db.Text
@@ -1316,6 +1327,8 @@ model loan {
1316
1327
  allocate_date DateTime? @default(now()) @db.DateTime(0)
1317
1328
  allocated_by String? @db.VarChar(64)
1318
1329
  lead leads @relation(fields: [leadID], references: [leadID])
1330
+ exported Boolean @default(false)
1331
+ collectionFollowups collectionfollowup[]
1319
1332
  }
1320
1333
 
1321
1334
  /// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client.