@factor-wise/prisma-schema 2.0.88 → 2.0.90

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.88",
3
+ "version": "2.0.90",
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",
@@ -2674,6 +2674,7 @@ model lms_users {
2674
2674
  callAssignedLeads leads[] @relation("CallAssignedUser")
2675
2675
  sanctionedLeads leads[] @relation("SanctionAssignedUser")
2676
2676
  collectionAssignedLeads leads[] @relation("CollectionAssignedUser")
2677
+ paymentDatesCreated payment_block_dates[] @relation("UserCreatedPaymentDates")
2677
2678
  }
2678
2679
 
2679
2680
  model lms_users_permissions {
@@ -2840,6 +2841,183 @@ model credforge_bre_log {
2840
2841
  }
2841
2842
 
2842
2843
 
2844
+ model credit_improve_customer {
2845
+ customerID Int @id @default(autoincrement())
2846
+ name String? @db.VarChar(100)
2847
+ firstName String? @db.VarChar(100)
2848
+ middlename String? @db.VarChar(100)
2849
+ lastName String? @db.VarChar(100)
2850
+ fatherName String? @db.VarChar(100)
2851
+ gender customer_gender? @default(NA)
2852
+ dob DateTime? @db.Date
2853
+ mobile BigInt
2854
+ email String? @db.VarChar(100)
2855
+ pancard String? @db.VarChar(100)
2856
+ aadharNo BigInt?
2857
+ otp String? @default("") @db.VarChar(20)
2858
+ emailOtp String? @db.VarChar(10)
2859
+ emailVerify Boolean? @default(false)
2860
+ refreshToken String? @db.VarChar(100)
2861
+ isVerified Boolean @default(dbgenerated("b'0'")) @db.Bit(1)
2862
+ createdDate DateTime @default(now()) @db.DateTime(0)
2863
+ pan_cust_verified Int @default(0)
2864
+ updatedAt DateTime? @default(now()) @updatedAt @db.Timestamp(0)
2865
+ utmSource String? @db.VarChar(256)
2866
+ alternateMobile String? @db.VarChar(50)
2867
+ current_address Json?
2868
+ digioKid String?
2869
+ digioToken String? @db.VarChar(100)
2870
+ kyc_at DateTime? @default(now()) @db.Timestamp(0)
2871
+ is_onboarded Boolean @default(false)
2872
+ last_login DateTime @default(now()) @db.Timestamp(0)
2873
+ loanApplied Boolean @default(false)
2874
+ permanent_address Json?
2875
+ step String? @db.VarChar(255)
2876
+
2877
+
2878
+ creaditImproveLeads creadit_improve_leads[]
2879
+ @@index([mobile], map: "idx_customer_mobile")
2880
+ @@index([pancard], map: "idx_customer_pancard")
2881
+ @@index([aadharNo], map: "idx_customer_aadhar")
2882
+ @@index([createdDate], map: "idx_customer_createdDate")
2883
+ @@index([utmSource], map: "idx_customer_utmSource")
2884
+ @@index([mobile, createdDate], map: "idx_mobile_created")
2885
+ @@index([pancard, createdDate], map: "idx_pan_created")
2886
+ @@index([utmSource, createdDate], map: "idx_source_created")
2887
+ }
2888
+
2889
+
2890
+
2891
+ model creadit_improve_leads {
2892
+ leadID Int @id @default(autoincrement())
2893
+ customerID Int?
2894
+
2895
+ purpose String? @db.VarChar(255)
2896
+ loanRequeried Float @default(500)
2897
+ status leads_status
2898
+ utmSource String @default("Website") @db.VarChar(100)
2899
+ fbLeads String?
2900
+ ip String
2901
+ callAssign Int
2902
+ creditAssign Int
2903
+ collectionUID Int?
2904
+ createdDate DateTime @default(now()) @db.Timestamp(0)
2905
+ updatedAt DateTime @default(now()) @db.DateTime(0)
2906
+ sanctionalloUID Int
2907
+ loanType lead_loan_type @default(improve_credit)
2908
+
2909
+ customer credit_improve_customer? @relation(fields: [customerID], references: [customerID])
2910
+ creditApprovals credit_improve_approval[] @relation("CreditImproveApprovalToLead")
2911
+ creditImproveLoan credit_improve_loan?
2912
+ creditImproveCollections credit_improve_collection[] @relation("CreditImproveCollectionToLead")
2913
+
2914
+
2915
+ @@index([customerID], map: "idx_customerID")
2916
+ @@index([status], map: "idx_status")
2917
+ @@index([utmSource], map: "idx_utmSource")
2918
+ @@index([fbLeads], map: "idx_fbLeads")
2919
+ @@index([callAssign], map: "idx_callAssign")
2920
+ @@index([collectionUID], map: "idx_collectionUID")
2921
+ @@index([sanctionalloUID], map: "idx_sanctionalloUID")
2922
+ @@index([createdDate], map: "idx_createdDate")
2923
+ @@index([updatedAt], map: "idx_updatedAt")
2924
+ @@index([loanType], map: "idx_loanType")
2925
+ }
2926
+
2927
+ model credit_improve_approval {
2928
+ approvalID Int @id @default(autoincrement())
2929
+ customerID Int?
2930
+ leadID Int
2931
+ loanType Int @default(0)
2932
+ productType String?
2933
+ branch String
2934
+ loanAmtApproved Float @default(0)
2935
+ tenure Int
2936
+ roi Float
2937
+ repayDate DateTime @db.Date
2938
+ adminFee Float
2939
+ plateFormFee Float? @default(0)
2940
+ creditRiskAnalisys Float? @default(0)
2941
+ GstOfAdminFee Float? @default(0)
2942
+ alternateMobile String @db.VarChar(20)
2943
+ officialEmail String @db.VarChar(100)
2944
+ monthlyIncome Float @default(0)
2945
+ cibil Int
2946
+ activePaydayLoan Int @default(0)
2947
+ status approval_status
2948
+ remark String?
2949
+ loanRequirePurpose String?
2950
+ creditedBy Int?
2951
+ rejectionReason String?
2952
+ redFlag String?
2953
+ createdDate DateTime @default(now()) @db.DateTime(0)
2954
+ updatedAt DateTime @default(now()) @db.DateTime(0)
2955
+ customerApproval approval_customerApproval @default(ZERO)
2956
+
2957
+ creditLead creadit_improve_leads @relation("CreditImproveApprovalToLead", fields: [leadID], references: [leadID])
2958
+
2959
+ @@index([leadID])
2960
+ }
2961
+
2962
+ model credit_improve_loan {
2963
+ id Int @id @default(autoincrement())
2964
+ leadID Int @unique
2965
+ loanNo String @unique
2966
+ customerID Int?
2967
+ disbursalAmount Float
2968
+ disbursalDate String? @db.Text
2969
+ disbursalTime DateTime @default(dbgenerated("'00:00:00'")) @db.Time(0)
2970
+ disbursalRefrenceNo String?
2971
+ accountNo String @db.VarChar(100)
2972
+ accountType String @db.VarChar(100)
2973
+ bankIfsc String @db.VarChar(100)
2974
+ bank String
2975
+ bankBranch String
2976
+ pdDate DateTime @db.Date
2977
+ pdDoneBy String @db.VarChar(100)
2978
+ deduction Float @default(0)
2979
+ remarks String
2980
+ status loan_status
2981
+ rejReason String? @db.VarChar(256)
2982
+ ip String @db.VarChar(100)
2983
+ disbursedBy Int?
2984
+ createdDate DateTime @default(now()) @db.DateTime(0)
2985
+ updatedAt DateTime @default(now()) @db.DateTime(0)
2986
+
2987
+ lead creadit_improve_leads @relation(fields: [leadID], references: [leadID])
2988
+
2989
+ @@index([customerID])
2990
+ @@index([status])
2991
+ }
2992
+
2993
+ model credit_improve_collection {
2994
+ collectionID Int @id @default(autoincrement())
2995
+ customerID String? @db.VarChar(50)
2996
+ leadID Int
2997
+ loanNo String
2998
+
2999
+ collectedAmount Float
3000
+ penaltyAmount Float?
3001
+ collectedMode collection_collectedMode @default(NA)
3002
+ collectedDate DateTime @db.Date
3003
+ referenceNo String
3004
+ discountAmount Float @default(0)
3005
+ settlemenAmount Float @default(0)
3006
+ status collection_status
3007
+ remark String
3008
+ collectedBy Int
3009
+ createdDate DateTime @default(now()) @db.DateTime(0)
3010
+
3011
+ collectionStatus String @default("Approved") @db.VarChar(216)
3012
+ collectionStatusby Int?
3013
+ approvedDate DateTime? @db.DateTime(0)
3014
+
3015
+ creditLead creadit_improve_leads @relation("CreditImproveCollectionToLead", fields: [leadID], references: [leadID])
3016
+
3017
+ @@index([leadID])
3018
+ }
3019
+
3020
+
2843
3021
  enum usersgoogle_oauth_provider {
2844
3022
  google
2845
3023
  facebook
@@ -3369,6 +3547,23 @@ model dsa_roles {
3369
3547
  vendors vendors[]
3370
3548
  }
3371
3549
 
3550
+ model payment_block_dates {
3551
+ id Int @id @default(autoincrement())
3552
+ date DateTime @db.Date
3553
+ reason String? @db.VarChar(255)
3554
+ isActive Boolean @default(true)
3555
+
3556
+ createdById Int?
3557
+
3558
+ createdBy lms_users? @relation("UserCreatedPaymentDates", fields: [createdById], references: [userID])
3559
+
3560
+ createdAt DateTime @default(now())
3561
+ updatedAt DateTime @updatedAt
3562
+
3563
+ @@unique([date])
3564
+ @@index([createdById])
3565
+ }
3566
+
3372
3567
  enum commission_type {
3373
3568
  PERCENTAGE // % based
3374
3569
  FIXED // per lead fixed amount