@factor-wise/prisma-schema 2.0.111 → 2.0.112

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 +138 -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.112",
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")
@@ -770,6 +772,8 @@ model customer_extended {
770
772
  locationType LocationType?
771
773
  customer customer @relation(fields: [customerID], references: [customerID])
772
774
 
775
+ callLogs ai_call_logs[]
776
+
773
777
  @@unique([customerID, locationType])
774
778
  @@index([latitude, longitude])
775
779
  }
@@ -3723,6 +3727,66 @@ model customer_notifications {
3723
3727
  @@index([isRead])
3724
3728
  }
3725
3729
 
3730
+ model ai_call_batches {
3731
+ id Int @id @default(autoincrement())
3732
+ batchId String @unique
3733
+ agent String?
3734
+ status String
3735
+ totalCalls Int
3736
+ completedCalls Int?
3737
+ failedCalls Int?
3738
+ createdAt DateTime @default(now())
3739
+ completedAt DateTime?
3740
+
3741
+ calls ai_call_logs[]
3742
+
3743
+ @@index([batchId])
3744
+ }
3745
+
3746
+ model ai_call_logs {
3747
+ id Int @id @default(autoincrement())
3748
+ callId String @unique
3749
+ batchId String
3750
+ customerID Int
3751
+ phoneNumber String
3752
+ status String
3753
+ duration Int?
3754
+ callStartedAt DateTime?
3755
+ completedAt DateTime?
3756
+ recordingUrl String?
3757
+ hangupCause String?
3758
+ agent String?
3759
+ createdAt DateTime @default(now())
3760
+ updatedAt DateTime @updatedAt
3761
+
3762
+ batch ai_call_batches @relation(fields: [batchId], references: [batchId], onDelete: Cascade)
3763
+ customer customer @relation(fields: [customerID], references: [customerID], onDelete: Cascade)
3764
+ aiCallAnalysis ai_call_analysis?
3765
+ customerExtended customer_extended? @relation(fields: [customer_extendedId], references: [id])
3766
+ customer_extendedId Int?
3767
+
3768
+ @@index([batchId])
3769
+ @@index([callId])
3770
+ @@index([phoneNumber])
3771
+ @@index([customerID])
3772
+ @@index([status])
3773
+ }
3774
+
3775
+ model ai_call_analysis {
3776
+ id Int @id @default(autoincrement())
3777
+ callId String @unique
3778
+ summary String? @db.Text
3779
+ tentativeDate DateTime?
3780
+ customerConfirmationStatus String?
3781
+ transcript Json?
3782
+ createdAt DateTime @default(now())
3783
+ updatedAt DateTime @updatedAt
3784
+
3785
+ call ai_call_logs @relation(fields: [callId], references: [callId], onDelete: Cascade)
3786
+
3787
+ @@index([callId])
3788
+ }
3789
+
3726
3790
  enum LocationType {
3727
3791
  login
3728
3792
  leadCreation