@factor-wise/prisma-schema 2.0.65 → 2.0.67

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.65",
3
+ "version": "2.0.67",
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",
@@ -274,7 +274,7 @@ model appvedio {
274
274
 
275
275
  model balance_history {
276
276
  id Int @id @default(autoincrement())
277
- leadID Int
277
+ leadID Int
278
278
  customerID Int
279
279
  balance_date DateTime? @default(now()) @db.Timestamp(0)
280
280
  consentId String?
@@ -516,7 +516,7 @@ model collection {
516
516
  orderID String @default("no") @db.VarChar(216)
517
517
  excess_amount String? @db.Text
518
518
  discount_waiver String? @db.Text
519
- discount_waiver_amount Float?
519
+ discount_waiver_amount Float?
520
520
  refund_utr_no String? @db.VarChar(256)
521
521
  s3key String?
522
522
  collectedByUser lms_users @relation("CollectionCollectedByUser", fields: [collectedBy], references: [userID])
@@ -673,7 +673,7 @@ model customer {
673
673
  isBlocked Boolean @default(false)
674
674
  utmSource String? @db.VarChar(256)
675
675
  alternateMobile String? @db.VarChar(50)
676
- current_address Json?
676
+ current_address Json?
677
677
  digioKid String?
678
678
  digioToken String? @db.VarChar(100)
679
679
  digioMobileNumber String?
@@ -681,7 +681,7 @@ model customer {
681
681
  is_onboarded Boolean @default(false)
682
682
  last_login DateTime @default(now()) @db.Timestamp(0)
683
683
  loanApplied Boolean @default(false)
684
- permanent_address Json?
684
+ permanent_address Json?
685
685
  presalesassign Int?
686
686
  companyName String? @db.Text
687
687
  step String? @db.VarChar(255)
@@ -971,7 +971,7 @@ model employment_history {
971
971
  lead leads @relation(fields: [leadID], references: [leadID], onDelete: Cascade)
972
972
  customer customer @relation(fields: [customerID], references: [customerID], onDelete: Cascade)
973
973
 
974
-
974
+
975
975
  @@index([leadID])
976
976
  @@index([customerID])
977
977
  @@index([status])
@@ -989,7 +989,7 @@ model profile_info {
989
989
  lead leads @relation(fields: [leadID], references: [leadID], onDelete: Cascade)
990
990
  customer customer @relation(fields: [customerID], references: [customerID], onDelete: Cascade)
991
991
 
992
-
992
+
993
993
  @@index([leadID])
994
994
  @@index([customerID])
995
995
  @@index([status])
@@ -1017,7 +1017,7 @@ model finb_logs {
1017
1017
  updated_at DateTime @updatedAt
1018
1018
  customer customer @relation(fields: [customerID], references: [customerID])
1019
1019
 
1020
-
1020
+
1021
1021
  @@index([customerID])
1022
1022
  @@index([status])
1023
1023
  @@index([type])
@@ -1041,7 +1041,7 @@ model face_comparison {
1041
1041
  updatedAt DateTime @updatedAt
1042
1042
  customer customer @relation(fields: [customerID], references: [customerID])
1043
1043
  lead leads? @relation(fields: [leadID], references: [leadID])
1044
-
1044
+
1045
1045
  @@index([customerID])
1046
1046
  @@index([leadID])
1047
1047
  }
@@ -1259,7 +1259,7 @@ model leads {
1259
1259
  createdDate DateTime @default(now()) @db.Timestamp(0)
1260
1260
  updatedAt DateTime @default(now()) @db.DateTime(0)
1261
1261
  alloUID String @default("no") @db.VarChar(216)
1262
- sanctionalloUID Int
1262
+ sanctionalloUID Int
1263
1263
  sanctionAppID String @default("no") @db.VarChar(216)
1264
1264
  entity_id String? @db.Text
1265
1265
  field_officer_id String? @db.Text
@@ -1779,7 +1779,7 @@ model icici_payout {
1779
1779
  model icici_Payoutlog {
1780
1780
  id Int @id @default(autoincrement())
1781
1781
  payoutId Int
1782
- step String
1782
+ step String
1783
1783
  payload Json
1784
1784
  actCode String?
1785
1785
  message String?
@@ -2454,7 +2454,7 @@ model cibildata {
2454
2454
  response_pdf Json?
2455
2455
  pdf_password String?
2456
2456
 
2457
- @@index([leadID], map: "idx_leadID")
2457
+ @@index([leadID], map: "idx_leadID")
2458
2458
  @@index([status], map: "idx_status")
2459
2459
  @@index([createdAt], map: "idx_createdAt")
2460
2460
  @@index([leadID, status], map: "idx_lead_status")
@@ -2546,7 +2546,7 @@ model lms_users {
2546
2546
  username String @unique(map: "username") @db.VarChar(100)
2547
2547
  password String @db.VarChar(255)
2548
2548
  otp String? @db.VarChar(255)
2549
- attempts Int?
2549
+ attempts Int?
2550
2550
  expire_at DateTime? @default(now()) @db.Timestamp(0)
2551
2551
  isVerified Boolean @default(false)
2552
2552
  role String? @db.VarChar(50)
@@ -2576,7 +2576,7 @@ model lms_users_permissions {
2576
2576
  users_permissions Json?
2577
2577
  reports_sidebar Json?
2578
2578
  reports_access Json?
2579
-
2579
+
2580
2580
  created_at DateTime? @default(now()) @db.Timestamp(0)
2581
2581
  updated_at DateTime? @default(now()) @db.Timestamp(0)
2582
2582
  lms_users lms_users @relation(fields: [user_id], references: [userID], onDelete: Cascade, onUpdate: NoAction, map: "lms_users_permissions_ibfk_1")
@@ -2691,7 +2691,7 @@ model cibil_fetch_logs {
2691
2691
  status String @default("PENDING")
2692
2692
  error_message String?
2693
2693
  createdAt DateTime @default(now())
2694
- updatedAt DateTime @updatedAt
2694
+ updatedAt DateTime @updatedAt
2695
2695
 
2696
2696
 
2697
2697
  @@index([leadID])
@@ -2979,15 +2979,23 @@ model fi {
2979
2979
  }
2980
2980
 
2981
2981
  model vendors {
2982
- id Int @id @default(autoincrement()) @db.UnsignedInt
2983
- name String @db.VarChar(255)
2984
- clientId String @unique @db.VarChar(100)
2985
- secretId String @db.VarChar(255)
2986
- isActive Boolean @default(true)
2987
- createdAt DateTime @default(now())
2988
- updatedAt DateTime @updatedAt
2982
+ id Int @id @default(autoincrement()) @db.UnsignedInt
2983
+ name String @db.VarChar(255)
2984
+ clientId String @unique @db.VarChar(100)
2985
+ secretId String @db.VarChar(255)
2986
+ email String @unique @db.VarChar(255)
2987
+ password String @db.VarChar(255)
2988
+ tag String? @db.VarChar(100)
2989
+ percentage Float?
2990
+ isActive Boolean @default(true)
2991
+ otp String? @default("") @db.VarChar(20)
2992
+ createdAt DateTime @default(now())
2993
+ updatedAt DateTime @updatedAt
2994
+ createdBy Int @default(1)
2989
2995
 
2990
- leads vendor_leads[]
2996
+ leads vendor_leads[]
2997
+ campaigns campaigns[]
2998
+ activityLogs activity_logs[]
2991
2999
  }
2992
3000
 
2993
3001
  model vendor_leads {
@@ -3077,6 +3085,66 @@ model sms {
3077
3085
  createdAt DateTime @default(now())
3078
3086
  }
3079
3087
 
3088
+ model activity_logs {
3089
+ id Int @id @default(autoincrement())
3090
+ userId Int @db.UnsignedInt
3091
+ apiCall String @map("api_call") @db.VarChar(255)
3092
+ payload Json
3093
+ changedPayload Json? @map("changed_payload")
3094
+ status status @default(ZERO)
3095
+ isDeleted Boolean @default(false)
3096
+
3097
+ createdAt DateTime @default(now())
3098
+ updatedAt DateTime @updatedAt
3099
+
3100
+ vendor vendors @relation(fields: [userId], references: [id])
3101
+
3102
+ @@index([userId])
3103
+ @@index([apiCall])
3104
+ @@index([status])
3105
+ @@map("activity_logs")
3106
+ }
3107
+
3108
+ model click_logs {
3109
+ id Int @id @default(autoincrement()) @db.UnsignedInt
3110
+ campaignId String @db.VarChar(36)
3111
+ IP Json
3112
+ userAgent Json
3113
+ redirectLink String @db.Text
3114
+ status status @default(ZERO)
3115
+ isDeleted Boolean @default(false)
3116
+ createdAt DateTime @default(now())
3117
+ updatedAt DateTime @updatedAt
3118
+
3119
+ campaign campaigns @relation(fields: [campaignId], references: [campaignId])
3120
+
3121
+ @@index([campaignId])
3122
+ @@index([status])
3123
+ @@index([isDeleted])
3124
+ }
3125
+
3126
+ model campaigns {
3127
+ id Int @id @default(autoincrement()) @db.UnsignedInt
3128
+ campaignId String @unique @db.VarChar(36)
3129
+ name String @db.VarChar(255)
3130
+ status status @default(ZERO)
3131
+ createdAt DateTime @default(now())
3132
+ updatedAt DateTime @updatedAt
3133
+
3134
+ createdBy Int @db.UnsignedInt
3135
+
3136
+ vendor vendors @relation(fields: [createdBy], references: [id])
3137
+
3138
+ clickLogs click_logs[]
3139
+
3140
+ @@index([createdBy])
3141
+ }
3142
+
3143
+ enum status {
3144
+ ZERO @map("0")
3145
+ ONE @map("1")
3146
+ }
3147
+
3080
3148
  enum fi_interactionStatus {
3081
3149
  INITIATED
3082
3150
  IN_PROCESS