@factor-wise/prisma-schema 2.0.84 → 2.0.86

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": "2.0.84",
3
+ "version": "2.0.86",
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",
@@ -526,6 +526,12 @@ model collection {
526
526
  @@index([leadID], map: "leadID")
527
527
  @@index([collectedBy])
528
528
  @@index([collectionStatusby])
529
+
530
+ @@index([collectionStatus, status], map: "idx_collection_status")
531
+ @@index([collectedDate], map: "idx_collection_date")
532
+ @@index([createdDate], map: "idx_collection_created")
533
+ @@index([collectionStatus, status, collectedDate], map: "idx_collection_export")
534
+ @@index([leadID, collectedDate], map: "idx_collection_lead_date")
529
535
  }
530
536
 
531
537
  /// 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
@@ -1346,6 +1352,7 @@ model leads {
1346
1352
  @@index([loanType], map: "idx_loanType")
1347
1353
  @@index([city], map: "idx_city")
1348
1354
  @@index([state], map: "idx_state")
1355
+ @@index([customerID, leadID], map: "idx_leads_customer_lead")
1349
1356
  }
1350
1357
 
1351
1358
  /// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client.
@@ -1523,6 +1530,8 @@ model loan {
1523
1530
 
1524
1531
  @@index([customerID], map: "idx_loan_customerID")
1525
1532
 
1533
+ @@index([loanID], map: "idx_loan_loanID")
1534
+
1526
1535
  @@index([status], map: "idx_loan_status")
1527
1536
 
1528
1537
  @@index([createdDate], map: "idx_loan_createdDate")
@@ -3117,6 +3126,9 @@ model vendors {
3117
3126
  parent vendors? @relation("VendorHierarchy", fields: [parentId], references: [id])
3118
3127
  children vendors[] @relation("VendorHierarchy")
3119
3128
 
3129
+ roleId Int?
3130
+ role dsa_roles? @relation(fields: [roleId], references: [id])
3131
+
3120
3132
  leads vendor_leads[]
3121
3133
  campaigns campaigns[]
3122
3134
  activityLogs activity_logs[]
@@ -3326,6 +3338,33 @@ model customer_app {
3326
3338
  customer customer @relation(fields: [customerID], references: [customerID], onDelete: Cascade)
3327
3339
  }
3328
3340
 
3341
+ model dsa_permissions {
3342
+ id Int @id @default(autoincrement())
3343
+ module String
3344
+ name String @unique
3345
+ description String?
3346
+
3347
+ createdAt DateTime @default(now())
3348
+ updatedAt DateTime @updatedAt
3349
+
3350
+ @@index([module])
3351
+ }
3352
+
3353
+ model dsa_roles {
3354
+ id Int @id @default(autoincrement())
3355
+ name String @unique
3356
+ description String?
3357
+
3358
+ permissionIds Json
3359
+
3360
+ isActive Boolean @default(true)
3361
+
3362
+ createdAt DateTime @default(now())
3363
+ updatedAt DateTime @updatedAt
3364
+
3365
+ vendors vendors[]
3366
+ }
3367
+
3329
3368
  enum commission_type {
3330
3369
  PERCENTAGE // % based
3331
3370
  FIXED // per lead fixed amount