@factor-wise/prisma-schema 2.0.130 → 2.0.131
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 +45 -42
package/package.json
CHANGED
package/prisma/schema.prisma
CHANGED
|
@@ -3501,9 +3501,10 @@ model vendors {
|
|
|
3501
3501
|
roleId Int?
|
|
3502
3502
|
role dsa_roles? @relation(fields: [roleId], references: [id])
|
|
3503
3503
|
|
|
3504
|
-
leads
|
|
3505
|
-
campaigns
|
|
3506
|
-
|
|
3504
|
+
leads vendor_leads[]
|
|
3505
|
+
campaignsOwned campaigns[] @relation("CampaignVendor")
|
|
3506
|
+
campaignsCreated campaigns[] @relation("CampaignCreator")
|
|
3507
|
+
activityLogs activity_logs[]
|
|
3507
3508
|
|
|
3508
3509
|
slabs vendor_commission_slabs[]
|
|
3509
3510
|
leadPricing vendor_lead_pricing[]
|
|
@@ -3513,9 +3514,9 @@ model vendor_commission_slabs {
|
|
|
3513
3514
|
id Int @id @default(autoincrement())
|
|
3514
3515
|
vendorId Int @db.UnsignedInt
|
|
3515
3516
|
|
|
3516
|
-
from
|
|
3517
|
-
to
|
|
3518
|
-
value
|
|
3517
|
+
from Int
|
|
3518
|
+
to Int
|
|
3519
|
+
value Float
|
|
3519
3520
|
createdAt DateTime @default(now())
|
|
3520
3521
|
updatedAt DateTime @updatedAt
|
|
3521
3522
|
|
|
@@ -3535,43 +3536,43 @@ model vendor_lead_pricing {
|
|
|
3535
3536
|
}
|
|
3536
3537
|
|
|
3537
3538
|
model vendor_leads {
|
|
3538
|
-
id
|
|
3539
|
+
id Int @id @default(autoincrement()) @db.UnsignedInt
|
|
3539
3540
|
|
|
3540
|
-
vendorId
|
|
3541
|
-
vendor
|
|
3541
|
+
vendorId Int @db.UnsignedInt
|
|
3542
|
+
vendor vendors @relation(fields: [vendorId], references: [id])
|
|
3542
3543
|
|
|
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?
|
|
3544
|
+
name String? @db.VarChar(255)
|
|
3545
|
+
mobile String @db.VarChar(20)
|
|
3546
|
+
pancard String? @unique
|
|
3547
|
+
email String? @db.VarChar(255)
|
|
3548
|
+
pincode String? @db.VarChar(10)
|
|
3549
|
+
monthly_income Decimal? @db.Decimal(15, 2)
|
|
3550
|
+
gender String? @db.VarChar(10)
|
|
3551
|
+
dob String? @db.VarChar(10)
|
|
3552
|
+
profession String? @db.VarChar(100)
|
|
3552
3553
|
|
|
3553
|
-
lead_id
|
|
3554
|
-
lead_type
|
|
3554
|
+
lead_id String? @db.VarChar(100)
|
|
3555
|
+
lead_type LeadType?
|
|
3555
3556
|
|
|
3556
|
-
status
|
|
3557
|
-
sub_status
|
|
3558
|
-
remark
|
|
3557
|
+
status LeadStatus @default(NEW)
|
|
3558
|
+
sub_status String? @db.VarChar(100)
|
|
3559
|
+
remark String? @db.Text
|
|
3559
3560
|
|
|
3560
|
-
isConverted
|
|
3561
|
-
convertedAt
|
|
3561
|
+
isConverted Boolean @default(false)
|
|
3562
|
+
convertedAt DateTime?
|
|
3562
3563
|
|
|
3563
|
-
assignedTo
|
|
3564
|
+
assignedTo Int?
|
|
3564
3565
|
|
|
3565
|
-
followUpDate
|
|
3566
|
-
lastCallAt
|
|
3566
|
+
followUpDate DateTime?
|
|
3567
|
+
lastCallAt DateTime?
|
|
3567
3568
|
|
|
3568
|
-
source
|
|
3569
|
-
batchId
|
|
3569
|
+
source String? @db.VarChar(100)
|
|
3570
|
+
batchId String? @db.VarChar(100)
|
|
3570
3571
|
|
|
3571
|
-
created_at
|
|
3572
|
-
updated_at
|
|
3572
|
+
created_at DateTime @default(now()) @db.Timestamp(0)
|
|
3573
|
+
updated_at DateTime @updatedAt @db.Timestamp(0)
|
|
3573
3574
|
|
|
3574
|
-
callLogs
|
|
3575
|
+
callLogs call_logs[]
|
|
3575
3576
|
|
|
3576
3577
|
@@unique([vendorId, mobile])
|
|
3577
3578
|
@@index([vendorId])
|
|
@@ -3641,7 +3642,7 @@ model activity_logs {
|
|
|
3641
3642
|
|
|
3642
3643
|
model click_logs {
|
|
3643
3644
|
id Int @id @default(autoincrement()) @db.UnsignedInt
|
|
3644
|
-
campaignId
|
|
3645
|
+
campaignId Int @db.UnsignedInt
|
|
3645
3646
|
IP Json
|
|
3646
3647
|
userAgent Json
|
|
3647
3648
|
redirectLink String @db.Text
|
|
@@ -3650,7 +3651,7 @@ model click_logs {
|
|
|
3650
3651
|
createdAt DateTime @default(now())
|
|
3651
3652
|
updatedAt DateTime @updatedAt
|
|
3652
3653
|
|
|
3653
|
-
campaign campaigns @relation(fields: [campaignId], references: [
|
|
3654
|
+
campaign campaigns @relation(fields: [campaignId], references: [id])
|
|
3654
3655
|
|
|
3655
3656
|
@@index([campaignId])
|
|
3656
3657
|
@@index([status])
|
|
@@ -3658,19 +3659,21 @@ model click_logs {
|
|
|
3658
3659
|
}
|
|
3659
3660
|
|
|
3660
3661
|
model campaigns {
|
|
3661
|
-
id
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
updatedAt DateTime @updatedAt
|
|
3662
|
+
id Int @id @default(autoincrement()) @db.UnsignedInt
|
|
3663
|
+
name String @unique @db.VarChar(255)
|
|
3664
|
+
status status @default(ZERO)
|
|
3665
|
+
createdAt DateTime @default(now())
|
|
3666
|
+
updatedAt DateTime @updatedAt
|
|
3667
3667
|
|
|
3668
3668
|
createdBy Int @db.UnsignedInt
|
|
3669
|
+
vendorId Int? @db.UnsignedInt
|
|
3669
3670
|
|
|
3670
|
-
vendor
|
|
3671
|
+
vendor vendors? @relation("CampaignVendor", fields: [vendorId], references: [id])
|
|
3672
|
+
creator vendors @relation("CampaignCreator", fields: [createdBy], references: [id])
|
|
3671
3673
|
|
|
3672
3674
|
clickLogs click_logs[]
|
|
3673
3675
|
|
|
3676
|
+
@@index([vendorId])
|
|
3674
3677
|
@@index([createdBy])
|
|
3675
3678
|
}
|
|
3676
3679
|
|