@factor-wise/prisma-schema 2.0.67 → 2.0.68
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 +55 -15
package/package.json
CHANGED
package/prisma/schema.prisma
CHANGED
|
@@ -2979,23 +2979,58 @@ model fi {
|
|
|
2979
2979
|
}
|
|
2980
2980
|
|
|
2981
2981
|
model vendors {
|
|
2982
|
-
id
|
|
2983
|
-
name
|
|
2984
|
-
clientId
|
|
2985
|
-
secretId
|
|
2986
|
-
email
|
|
2987
|
-
password
|
|
2988
|
-
tag
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2982
|
+
id Int @id @default(autoincrement()) @db.UnsignedInt
|
|
2983
|
+
name String @db.VarChar(255)
|
|
2984
|
+
clientId String @unique @db.VarChar(100)
|
|
2985
|
+
secretId String @db.VarChar(255)
|
|
2986
|
+
email String @unique @db.VarChar(255)
|
|
2987
|
+
password String @db.VarChar(255)
|
|
2988
|
+
tag String? @db.VarChar(100)
|
|
2989
|
+
|
|
2990
|
+
commissionType commission_type?
|
|
2991
|
+
commissionValue Float?
|
|
2992
|
+
|
|
2993
|
+
isActive Boolean @default(true)
|
|
2994
|
+
otp String? @default("") @db.VarChar(20)
|
|
2995
|
+
createdAt DateTime @default(now())
|
|
2996
|
+
updatedAt DateTime @updatedAt
|
|
2997
|
+
createdBy Int @default(1)
|
|
2998
|
+
|
|
2999
|
+
parentId Int? @db.UnsignedInt
|
|
3000
|
+
parent vendors? @relation("VendorHierarchy", fields: [parentId], references: [id])
|
|
3001
|
+
children vendors[] @relation("VendorHierarchy")
|
|
2995
3002
|
|
|
2996
3003
|
leads vendor_leads[]
|
|
2997
3004
|
campaigns campaigns[]
|
|
2998
3005
|
activityLogs activity_logs[]
|
|
3006
|
+
|
|
3007
|
+
slabs vendor_commission_slabs[]
|
|
3008
|
+
leadPricing vendor_lead_pricing[]
|
|
3009
|
+
}
|
|
3010
|
+
|
|
3011
|
+
model vendor_commission_slabs {
|
|
3012
|
+
id Int @id @default(autoincrement())
|
|
3013
|
+
vendorId Int @db.UnsignedInt
|
|
3014
|
+
|
|
3015
|
+
minLeads Int
|
|
3016
|
+
maxLeads Int
|
|
3017
|
+
amount Float
|
|
3018
|
+
createdAt DateTime @default(now())
|
|
3019
|
+
updatedAt DateTime @updatedAt
|
|
3020
|
+
|
|
3021
|
+
vendor vendors @relation(fields: [vendorId], references: [id])
|
|
3022
|
+
}
|
|
3023
|
+
|
|
3024
|
+
model vendor_lead_pricing {
|
|
3025
|
+
id Int @id @default(autoincrement())
|
|
3026
|
+
vendorId Int @db.UnsignedInt
|
|
3027
|
+
|
|
3028
|
+
leadId Int
|
|
3029
|
+
amount Float
|
|
3030
|
+
createdAt DateTime @default(now())
|
|
3031
|
+
updatedAt DateTime @updatedAt
|
|
3032
|
+
|
|
3033
|
+
vendor vendors @relation(fields: [vendorId], references: [id])
|
|
2999
3034
|
}
|
|
3000
3035
|
|
|
3001
3036
|
model vendor_leads {
|
|
@@ -3060,8 +3095,6 @@ model call_logs {
|
|
|
3060
3095
|
@@index([agentId])
|
|
3061
3096
|
}
|
|
3062
3097
|
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
3098
|
enum fi_bucket {
|
|
3066
3099
|
BUCKET_10_30 @map("10-30")
|
|
3067
3100
|
BUCKET_31_60 @map("31-60")
|
|
@@ -3140,6 +3173,13 @@ model campaigns {
|
|
|
3140
3173
|
@@index([createdBy])
|
|
3141
3174
|
}
|
|
3142
3175
|
|
|
3176
|
+
enum commission_type {
|
|
3177
|
+
PERCENTAGE // % based
|
|
3178
|
+
FIXED // per lead fixed amount
|
|
3179
|
+
SLAB // slab based
|
|
3180
|
+
CUSTOM_LEAD // per lead custom pricing
|
|
3181
|
+
}
|
|
3182
|
+
|
|
3143
3183
|
enum status {
|
|
3144
3184
|
ZERO @map("0")
|
|
3145
3185
|
ONE @map("1")
|