@factor-wise/prisma-schema 2.0.111 → 2.0.113

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/prisma/schema.prisma +141 -74
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factor-wise/prisma-schema",
3
- "version": "2.0.111",
3
+ "version": "2.0.113",
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",
@@ -641,86 +641,88 @@ model convoque_call_logs {
641
641
  }
642
642
 
643
643
  model customer {
644
- customerID Int @id @default(autoincrement())
645
- name String? @db.VarChar(100)
646
- firstName String? @db.VarChar(100)
647
- middlename String? @db.VarChar(100)
648
- lastName String? @db.VarChar(100)
649
- fatherName String? @db.VarChar(100)
650
- gender customer_gender? @default(NA)
651
- dob DateTime? @db.Date
652
- mobile BigInt
653
- email String? @db.VarChar(100)
654
- pancard String? @db.VarChar(100)
655
- aadharNo BigInt?
656
- password String @default("") @db.VarChar(20)
657
- marrital String? @db.VarChar(10)
658
- profile String? @db.VarChar(100)
659
- otp String? @default("") @db.VarChar(20)
660
- emailOtp String? @db.VarChar(10)
661
- emailVerify Boolean? @default(false)
662
- refreshToken String? @db.VarChar(100)
663
- isVerified Boolean @default(dbgenerated("b'0'")) @db.Bit(1)
664
- employeeType customer_employeeType?
665
- createdDate DateTime @default(now()) @db.DateTime(0)
666
- industry String? @db.Text
667
- designation String? @db.Text
668
- working_since String? @db.Text
669
- salary_date String? @db.Text
670
- official_email String? @db.Text
671
- education String? @db.Text
672
- pan_cust_verified Int @default(0)
673
- dob_digit_match customer_dob_digit_match?
674
- razorpay_cust_id String? @db.VarChar(100)
675
- reloaneligible customer_reloaneligible? @default(Approve)
676
- reloanremark String? @db.VarChar(255)
677
- fraudcheck Boolean? @default(false)
678
- updatedAt DateTime? @default(now()) @updatedAt @db.Timestamp(0)
679
- customerappId Int?
680
- isBlocked Boolean @default(false)
681
- utmSource String? @db.VarChar(256)
682
- alternateMobile String? @db.VarChar(50)
683
- current_address Json?
684
- digioKid String?
685
- digioToken String? @db.VarChar(100)
686
- digioMobileNumber String?
687
- kyc_at DateTime? @default(now()) @db.Timestamp(0)
688
- is_onboarded Boolean @default(false)
689
- last_login DateTime @default(now()) @db.Timestamp(0)
690
- loanApplied Boolean @default(false)
691
- permanent_address Json?
692
- presalesassign Int?
693
- companyName String? @db.Text
694
- step String? @db.VarChar(255)
695
- razorpay_contact_id String? @db.VarChar(100)
696
- addresses address[]
697
- bankstatement bankstatement[]
698
- customerapp customerapp? @relation(fields: [customerappId], references: [customerID], map: "fk_customer_customerapp")
699
- accounts customeraccount[]
700
- document document[]
701
- employer employer[]
702
- leads leads[]
703
- reference reference[]
704
- reloan_status reloan_status[]
705
- reminders reminders[]
706
- aiAgentCallLogs AIAgentCallLog[]
707
- employmentHistory employment_history[]
708
- profileInfo profile_info[]
709
- finb_logs finb_logs[]
710
- face_comparison face_comparison[]
711
- preoffer preoffer[]
712
- customer_extended customer_extended?
713
- criffsoftpull criffsoftpull[]
714
- credforge_bre_log credforge_bre_log[]
715
- sms customer_sms[]
716
- contacts customer_contact[]
717
- apps customer_app[]
644
+ customerID Int @id @default(autoincrement())
645
+ name String? @db.VarChar(100)
646
+ firstName String? @db.VarChar(100)
647
+ middlename String? @db.VarChar(100)
648
+ lastName String? @db.VarChar(100)
649
+ fatherName String? @db.VarChar(100)
650
+ gender customer_gender? @default(NA)
651
+ dob DateTime? @db.Date
652
+ mobile BigInt
653
+ email String? @db.VarChar(100)
654
+ pancard String? @db.VarChar(100)
655
+ aadharNo BigInt?
656
+ password String @default("") @db.VarChar(20)
657
+ marrital String? @db.VarChar(10)
658
+ profile String? @db.VarChar(100)
659
+ otp String? @default("") @db.VarChar(20)
660
+ emailOtp String? @db.VarChar(10)
661
+ emailVerify Boolean? @default(false)
662
+ refreshToken String? @db.VarChar(100)
663
+ isVerified Boolean @default(dbgenerated("b'0'")) @db.Bit(1)
664
+ employeeType customer_employeeType?
665
+ createdDate DateTime @default(now()) @db.DateTime(0)
666
+ industry String? @db.Text
667
+ designation String? @db.Text
668
+ working_since String? @db.Text
669
+ salary_date String? @db.Text
670
+ official_email String? @db.Text
671
+ education String? @db.Text
672
+ pan_cust_verified Int @default(0)
673
+ dob_digit_match customer_dob_digit_match?
674
+ razorpay_cust_id String? @db.VarChar(100)
675
+ reloaneligible customer_reloaneligible? @default(Approve)
676
+ reloanremark String? @db.VarChar(255)
677
+ fraudcheck Boolean? @default(false)
678
+ updatedAt DateTime? @default(now()) @updatedAt @db.Timestamp(0)
679
+ customerappId Int?
680
+ isBlocked Boolean @default(false)
681
+ utmSource String? @db.VarChar(256)
682
+ alternateMobile String? @db.VarChar(50)
683
+ current_address Json?
684
+ digioKid String?
685
+ digioToken String? @db.VarChar(100)
686
+ digioMobileNumber String?
687
+ kyc_at DateTime? @default(now()) @db.Timestamp(0)
688
+ is_onboarded Boolean @default(false)
689
+ last_login DateTime @default(now()) @db.Timestamp(0)
690
+ loanApplied Boolean @default(false)
691
+ permanent_address Json?
692
+ presalesassign Int?
693
+ companyName String? @db.Text
694
+ step String? @db.VarChar(255)
695
+ razorpay_contact_id String? @db.VarChar(100)
696
+ addresses address[]
697
+ bankstatement bankstatement[]
698
+ customerapp customerapp? @relation(fields: [customerappId], references: [customerID], map: "fk_customer_customerapp")
699
+ accounts customeraccount[]
700
+ document document[]
701
+ employer employer[]
702
+ leads leads[]
703
+ reference reference[]
704
+ reloan_status reloan_status[]
705
+ reminders reminders[]
706
+ aiAgentCallLogs AIAgentCallLog[]
707
+ employmentHistory employment_history[]
708
+ profileInfo profile_info[]
709
+ finb_logs finb_logs[]
710
+ face_comparison face_comparison[]
711
+ preoffer preoffer[]
712
+ customer_extended customer_extended?
713
+ criffsoftpull criffsoftpull[]
714
+ credforge_bre_log credforge_bre_log[]
715
+ sms customer_sms[]
716
+ contacts customer_contact[]
717
+ apps customer_app[]
718
718
  credit_improve_customer credit_improve_customer?
719
719
 
720
720
  customerDevices customer_devices[]
721
721
 
722
722
  notifications customer_notifications[]
723
723
 
724
+ aiCallLogs ai_call_logs[]
725
+
724
726
  @@index([mobile], map: "idx_customer_mobile")
725
727
  @@index([email], map: "idx_customer_email")
726
728
  @@index([pancard], map: "idx_customer_pancard")
@@ -1415,6 +1417,8 @@ model leads {
1415
1417
  icici_payout icici_payout[]
1416
1418
  face_comparison face_comparison[]
1417
1419
  credforge_bre_log credforge_bre_log[]
1420
+ aiCallBatches ai_call_batches[]
1421
+ aiCallLogs ai_call_logs[]
1418
1422
 
1419
1423
  @@index([customerID], map: "idx_customerID")
1420
1424
  @@index([userID], map: "idx_userID")
@@ -3723,6 +3727,69 @@ model customer_notifications {
3723
3727
  @@index([isRead])
3724
3728
  }
3725
3729
 
3730
+ model ai_call_batches {
3731
+ id Int @id @default(autoincrement())
3732
+ leadID Int
3733
+ batchId String @unique
3734
+ agent String?
3735
+ status String
3736
+ totalCalls Int
3737
+ completedCalls Int?
3738
+ failedCalls Int?
3739
+ createdAt DateTime @default(now())
3740
+ completedAt DateTime?
3741
+
3742
+ lead leads @relation(fields: [leadID], references: [leadID])
3743
+
3744
+ calls ai_call_logs[]
3745
+
3746
+ @@index([batchId])
3747
+ }
3748
+
3749
+ model ai_call_logs {
3750
+ id Int @id @default(autoincrement())
3751
+ callId String @unique
3752
+ batchId String
3753
+ customerID Int
3754
+ phoneNumber String
3755
+ status String
3756
+ duration Int?
3757
+ callStartedAt DateTime?
3758
+ completedAt DateTime?
3759
+ recordingUrl String?
3760
+ hangupCause String?
3761
+ agent String?
3762
+ createdAt DateTime @default(now())
3763
+ updatedAt DateTime @updatedAt
3764
+
3765
+ batch ai_call_batches @relation(fields: [batchId], references: [batchId], onDelete: Cascade)
3766
+ customer customer @relation(fields: [customerID], references: [customerID], onDelete: Cascade)
3767
+ aiCallAnalysis ai_call_analysis?
3768
+ lead leads @relation(fields: [leadID], references: [leadID])
3769
+ leadID Int
3770
+
3771
+ @@index([batchId])
3772
+ @@index([callId])
3773
+ @@index([phoneNumber])
3774
+ @@index([customerID])
3775
+ @@index([status])
3776
+ }
3777
+
3778
+ model ai_call_analysis {
3779
+ id Int @id @default(autoincrement())
3780
+ callId String @unique
3781
+ summary String? @db.Text
3782
+ tentativeDate DateTime?
3783
+ customerConfirmationStatus String?
3784
+ transcript Json?
3785
+ createdAt DateTime @default(now())
3786
+ updatedAt DateTime @updatedAt
3787
+
3788
+ call ai_call_logs @relation(fields: [callId], references: [callId], onDelete: Cascade)
3789
+
3790
+ @@index([callId])
3791
+ }
3792
+
3726
3793
  enum LocationType {
3727
3794
  login
3728
3795
  leadCreation