Add custom inputs to commission types
This commit is contained in:
@ -24,8 +24,9 @@ model CommissionType {
|
||||
|
||||
description String?
|
||||
|
||||
options CommissionTypeOption[]
|
||||
extras CommissionTypeExtra[]
|
||||
options CommissionTypeOption[]
|
||||
extras CommissionTypeExtra[]
|
||||
customInputs CommissionTypeCustomInput[]
|
||||
}
|
||||
|
||||
model CommissionOption {
|
||||
@ -54,6 +55,18 @@ model CommissionExtra {
|
||||
types CommissionTypeExtra[]
|
||||
}
|
||||
|
||||
model CommissionCustomInput {
|
||||
id String @id @default(cuid())
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
sortIndex Int @default(0)
|
||||
|
||||
name String @unique
|
||||
fieldId String
|
||||
|
||||
types CommissionTypeCustomInput[]
|
||||
}
|
||||
|
||||
model CommissionTypeOption {
|
||||
id String @id @default(cuid())
|
||||
createdAt DateTime @default(now())
|
||||
@ -92,6 +105,25 @@ model CommissionTypeExtra {
|
||||
@@unique([typeId, extraId])
|
||||
}
|
||||
|
||||
model CommissionTypeCustomInput {
|
||||
id String @id @default(cuid())
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
sortIndex Int @default(0)
|
||||
|
||||
typeId String
|
||||
customInputId String
|
||||
|
||||
inputType String
|
||||
label String
|
||||
required Boolean @default(false)
|
||||
|
||||
type CommissionType @relation(fields: [typeId], references: [id])
|
||||
customInput CommissionCustomInput @relation(fields: [customInputId], references: [id])
|
||||
|
||||
@@unique([typeId, customInputId])
|
||||
}
|
||||
|
||||
model TermsOfService {
|
||||
id String @id @default(cuid())
|
||||
createdAt DateTime @default(now())
|
||||
|
Reference in New Issue
Block a user