@factor-wise/prisma-schema 2.0.130 → 2.0.132
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 +1 -1
- package/prisma/schema.prisma +74 -66
package/package.json
CHANGED
package/prisma/schema.prisma
CHANGED
|
@@ -809,15 +809,18 @@ model customer_locations {
|
|
|
809
809
|
@@index([latitude, longitude])
|
|
810
810
|
}
|
|
811
811
|
|
|
812
|
-
model
|
|
812
|
+
model customer_calling_remarks {
|
|
813
813
|
id Int @id @default(autoincrement())
|
|
814
|
-
customerId Int
|
|
815
814
|
leadID Int
|
|
816
|
-
|
|
815
|
+
callingRemark String @db.Text
|
|
817
816
|
createdBy Int
|
|
818
|
-
createdDate DateTime
|
|
817
|
+
createdDate DateTime @default(now()) @db.DateTime(0)
|
|
819
818
|
|
|
820
|
-
|
|
819
|
+
lead leads @relation(fields: [leadID], references: [leadID])
|
|
820
|
+
createdByUser lms_users @relation(fields: [createdBy], references: [userID])
|
|
821
|
+
|
|
822
|
+
@@index([leadID], map: "customer_credit_remarks_leadID_fkey")
|
|
823
|
+
@@index([createdBy], map: "customer_credit_remarks_createdBy_fkey")
|
|
821
824
|
}
|
|
822
825
|
|
|
823
826
|
/// 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
|
|
@@ -1453,6 +1456,7 @@ model leads {
|
|
|
1453
1456
|
credforge_bre_log credforge_bre_log[]
|
|
1454
1457
|
aiCallLogs ai_call_logs[]
|
|
1455
1458
|
creditRemarks credit_remarks[]
|
|
1459
|
+
customercallingremarks customer_calling_remarks[]
|
|
1456
1460
|
|
|
1457
1461
|
@@index([customerID], map: "idx_customerID")
|
|
1458
1462
|
@@index([userID], map: "idx_userID")
|
|
@@ -2016,25 +2020,25 @@ model penny_drop {
|
|
|
2016
2020
|
|
|
2017
2021
|
/// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client.
|
|
2018
2022
|
model pincode {
|
|
2019
|
-
id
|
|
2020
|
-
pincode
|
|
2021
|
-
circlename
|
|
2022
|
-
regionname
|
|
2023
|
-
divisionname
|
|
2024
|
-
officename
|
|
2025
|
-
officetype
|
|
2026
|
-
delivery
|
|
2027
|
-
district
|
|
2028
|
-
statename
|
|
2029
|
-
latitude
|
|
2030
|
-
longitude
|
|
2031
|
-
type
|
|
2032
|
-
riskStatus
|
|
2033
|
-
riskEligibleFlag
|
|
2034
|
-
eligibleSince
|
|
2035
|
-
isActive
|
|
2036
|
-
createdAt
|
|
2037
|
-
updatedAt
|
|
2023
|
+
id BigInt @id @default(autoincrement())
|
|
2024
|
+
pincode String @db.VarChar(10)
|
|
2025
|
+
circlename String? @db.VarChar(100)
|
|
2026
|
+
regionname String? @db.VarChar(100)
|
|
2027
|
+
divisionname String? @db.VarChar(100)
|
|
2028
|
+
officename String? @db.VarChar(100)
|
|
2029
|
+
officetype String? @db.VarChar(50)
|
|
2030
|
+
delivery String? @db.VarChar(50)
|
|
2031
|
+
district String? @db.VarChar(100)
|
|
2032
|
+
statename String? @db.VarChar(100)
|
|
2033
|
+
latitude String? @db.VarChar(20)
|
|
2034
|
+
longitude String? @db.VarChar(20)
|
|
2035
|
+
type String? @db.VarChar(50)
|
|
2036
|
+
riskStatus String? @db.VarChar(50)
|
|
2037
|
+
riskEligibleFlag String? @db.VarChar(50)
|
|
2038
|
+
eligibleSince String? @db.VarChar(50)
|
|
2039
|
+
isActive Boolean @default(false)
|
|
2040
|
+
createdAt DateTime @default(now())
|
|
2041
|
+
updatedAt DateTime @updatedAt
|
|
2038
2042
|
|
|
2039
2043
|
@@unique([pincode])
|
|
2040
2044
|
@@index([pincode, isActive, district, statename])
|
|
@@ -2790,6 +2794,7 @@ model lms_users {
|
|
|
2790
2794
|
paymentDatesCreated payment_block_dates[] @relation("UserCreatedPaymentDates")
|
|
2791
2795
|
paymentDatesUpdated payment_block_dates[] @relation("UserUpdatedPaymentDates")
|
|
2792
2796
|
creditRemarks credit_remarks[]
|
|
2797
|
+
customercallingremarks customer_calling_remarks[]
|
|
2793
2798
|
}
|
|
2794
2799
|
|
|
2795
2800
|
model lms_users_permissions {
|
|
@@ -3501,9 +3506,10 @@ model vendors {
|
|
|
3501
3506
|
roleId Int?
|
|
3502
3507
|
role dsa_roles? @relation(fields: [roleId], references: [id])
|
|
3503
3508
|
|
|
3504
|
-
leads
|
|
3505
|
-
campaigns
|
|
3506
|
-
|
|
3509
|
+
leads vendor_leads[]
|
|
3510
|
+
campaignsOwned campaigns[] @relation("CampaignVendor")
|
|
3511
|
+
campaignsCreated campaigns[] @relation("CampaignCreator")
|
|
3512
|
+
activityLogs activity_logs[]
|
|
3507
3513
|
|
|
3508
3514
|
slabs vendor_commission_slabs[]
|
|
3509
3515
|
leadPricing vendor_lead_pricing[]
|
|
@@ -3513,9 +3519,9 @@ model vendor_commission_slabs {
|
|
|
3513
3519
|
id Int @id @default(autoincrement())
|
|
3514
3520
|
vendorId Int @db.UnsignedInt
|
|
3515
3521
|
|
|
3516
|
-
from
|
|
3517
|
-
to
|
|
3518
|
-
value
|
|
3522
|
+
from Int
|
|
3523
|
+
to Int
|
|
3524
|
+
value Float
|
|
3519
3525
|
createdAt DateTime @default(now())
|
|
3520
3526
|
updatedAt DateTime @updatedAt
|
|
3521
3527
|
|
|
@@ -3535,43 +3541,43 @@ model vendor_lead_pricing {
|
|
|
3535
3541
|
}
|
|
3536
3542
|
|
|
3537
3543
|
model vendor_leads {
|
|
3538
|
-
id
|
|
3544
|
+
id Int @id @default(autoincrement()) @db.UnsignedInt
|
|
3539
3545
|
|
|
3540
|
-
vendorId
|
|
3541
|
-
vendor
|
|
3546
|
+
vendorId Int @db.UnsignedInt
|
|
3547
|
+
vendor vendors @relation(fields: [vendorId], references: [id])
|
|
3542
3548
|
|
|
3543
|
-
name String?
|
|
3544
|
-
mobile String
|
|
3545
|
-
pancard String?
|
|
3546
|
-
email String?
|
|
3547
|
-
pincode String?
|
|
3548
|
-
monthly_income Decimal?
|
|
3549
|
-
gender String?
|
|
3550
|
-
dob String?
|
|
3551
|
-
profession String?
|
|
3549
|
+
name String? @db.VarChar(255)
|
|
3550
|
+
mobile String @db.VarChar(20)
|
|
3551
|
+
pancard String? @unique
|
|
3552
|
+
email String? @db.VarChar(255)
|
|
3553
|
+
pincode String? @db.VarChar(10)
|
|
3554
|
+
monthly_income Decimal? @db.Decimal(15, 2)
|
|
3555
|
+
gender String? @db.VarChar(10)
|
|
3556
|
+
dob String? @db.VarChar(10)
|
|
3557
|
+
profession String? @db.VarChar(100)
|
|
3552
3558
|
|
|
3553
|
-
lead_id
|
|
3554
|
-
lead_type
|
|
3559
|
+
lead_id String? @db.VarChar(100)
|
|
3560
|
+
lead_type LeadType?
|
|
3555
3561
|
|
|
3556
|
-
status
|
|
3557
|
-
sub_status
|
|
3558
|
-
remark
|
|
3562
|
+
status LeadStatus @default(NEW)
|
|
3563
|
+
sub_status String? @db.VarChar(100)
|
|
3564
|
+
remark String? @db.Text
|
|
3559
3565
|
|
|
3560
|
-
isConverted
|
|
3561
|
-
convertedAt
|
|
3566
|
+
isConverted Boolean @default(false)
|
|
3567
|
+
convertedAt DateTime?
|
|
3562
3568
|
|
|
3563
|
-
assignedTo
|
|
3569
|
+
assignedTo Int?
|
|
3564
3570
|
|
|
3565
|
-
followUpDate
|
|
3566
|
-
lastCallAt
|
|
3571
|
+
followUpDate DateTime?
|
|
3572
|
+
lastCallAt DateTime?
|
|
3567
3573
|
|
|
3568
|
-
source
|
|
3569
|
-
batchId
|
|
3574
|
+
source String? @db.VarChar(100)
|
|
3575
|
+
batchId String? @db.VarChar(100)
|
|
3570
3576
|
|
|
3571
|
-
created_at
|
|
3572
|
-
updated_at
|
|
3577
|
+
created_at DateTime @default(now()) @db.Timestamp(0)
|
|
3578
|
+
updated_at DateTime @updatedAt @db.Timestamp(0)
|
|
3573
3579
|
|
|
3574
|
-
callLogs
|
|
3580
|
+
callLogs call_logs[]
|
|
3575
3581
|
|
|
3576
3582
|
@@unique([vendorId, mobile])
|
|
3577
3583
|
@@index([vendorId])
|
|
@@ -3641,7 +3647,7 @@ model activity_logs {
|
|
|
3641
3647
|
|
|
3642
3648
|
model click_logs {
|
|
3643
3649
|
id Int @id @default(autoincrement()) @db.UnsignedInt
|
|
3644
|
-
campaignId
|
|
3650
|
+
campaignId Int @db.UnsignedInt
|
|
3645
3651
|
IP Json
|
|
3646
3652
|
userAgent Json
|
|
3647
3653
|
redirectLink String @db.Text
|
|
@@ -3650,7 +3656,7 @@ model click_logs {
|
|
|
3650
3656
|
createdAt DateTime @default(now())
|
|
3651
3657
|
updatedAt DateTime @updatedAt
|
|
3652
3658
|
|
|
3653
|
-
campaign campaigns @relation(fields: [campaignId], references: [
|
|
3659
|
+
campaign campaigns @relation(fields: [campaignId], references: [id])
|
|
3654
3660
|
|
|
3655
3661
|
@@index([campaignId])
|
|
3656
3662
|
@@index([status])
|
|
@@ -3658,19 +3664,21 @@ model click_logs {
|
|
|
3658
3664
|
}
|
|
3659
3665
|
|
|
3660
3666
|
model campaigns {
|
|
3661
|
-
id
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
updatedAt DateTime @updatedAt
|
|
3667
|
+
id Int @id @default(autoincrement()) @db.UnsignedInt
|
|
3668
|
+
name String @unique @db.VarChar(255)
|
|
3669
|
+
status status @default(ZERO)
|
|
3670
|
+
createdAt DateTime @default(now())
|
|
3671
|
+
updatedAt DateTime @updatedAt
|
|
3667
3672
|
|
|
3668
3673
|
createdBy Int @db.UnsignedInt
|
|
3674
|
+
vendorId Int? @db.UnsignedInt
|
|
3669
3675
|
|
|
3670
|
-
vendor
|
|
3676
|
+
vendor vendors? @relation("CampaignVendor", fields: [vendorId], references: [id])
|
|
3677
|
+
creator vendors @relation("CampaignCreator", fields: [createdBy], references: [id])
|
|
3671
3678
|
|
|
3672
3679
|
clickLogs click_logs[]
|
|
3673
3680
|
|
|
3681
|
+
@@index([vendorId])
|
|
3674
3682
|
@@index([createdBy])
|
|
3675
3683
|
}
|
|
3676
3684
|
|