@factor-wise/prisma-schema 1.0.29 → 2.0.1

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.1",
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",
@@ -26,9 +26,10 @@
26
26
  "author": "Factor Wise",
27
27
  "license": "ISC",
28
28
  "dependencies": {
29
- "@prisma/client": "^6.19.0"
29
+ "@prisma/client": "^7.2.0"
30
30
  },
31
31
  "devDependencies": {
32
- "prisma": "^6.19.0"
32
+ "@types/node": "^25.0.3",
33
+ "prisma": "^7.2.0"
33
34
  }
34
35
  }
@@ -4,7 +4,6 @@ generator client {
4
4
 
5
5
  datasource db {
6
6
  provider = "mysql"
7
- url = env("DATABASE_URL")
8
7
  }
9
8
 
10
9
  model address {
@@ -534,6 +533,12 @@ model collectionfollowup {
534
533
  createdDate DateTime @default(now()) @db.Timestamp(0)
535
534
  followup_type Int @default(0)
536
535
  reason String? @db.Text
536
+
537
+ lead leads @relation(fields: [leadID], references: [leadID], onDelete: Cascade)
538
+ loan loan @relation(fields: [loanNo], references: [loanNo], onDelete: Cascade)
539
+
540
+ @@index([leadID])
541
+ @@index([loanNo])
537
542
  }
538
543
 
539
544
  model collectionrefund {
@@ -688,6 +693,8 @@ model customer_credit_remarks {
688
693
  creditRemark String @db.Text
689
694
  createdBy Int
690
695
  createdDate DateTime? @default(now()) @db.DateTime(0)
696
+ lead leads @relation(fields: [leadID], references: [leadID])
697
+ @@index([leadID], map: "approval_leadID_fkey")
691
698
  }
692
699
 
693
700
  /// 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 +1151,9 @@ model leads {
1144
1151
  collections collection[]
1145
1152
  customer customer? @relation(fields: [customerID], references: [customerID])
1146
1153
  loan loan?
1154
+ collectionFollowups collectionfollowup[]
1155
+ creditRemarks customer_credit_remarks[]
1156
+
1147
1157
 
1148
1158
  @@index([customerID], map: "leadcustomerID")
1149
1159
  }
@@ -1290,7 +1300,7 @@ model loan {
1290
1300
  id Int @id @default(autoincrement())
1291
1301
  loanID Int
1292
1302
  leadID Int @unique
1293
- loanNo String
1303
+ loanNo String @unique
1294
1304
  customerID Int?
1295
1305
  disbursalAmount Float
1296
1306
  disbursalDate String? @db.Text
@@ -1316,6 +1326,8 @@ model loan {
1316
1326
  allocate_date DateTime? @default(now()) @db.DateTime(0)
1317
1327
  allocated_by String? @db.VarChar(64)
1318
1328
  lead leads @relation(fields: [leadID], references: [leadID])
1329
+ exported Boolean @default(false)
1330
+ collectionFollowups collectionfollowup[]
1319
1331
  }
1320
1332
 
1321
1333
  /// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client.