refactor: update constraints
This commit is contained in:
parent
8f5f4822f9
commit
126a44cb7f
2 changed files with 20 additions and 3 deletions
|
|
@ -858,7 +858,7 @@ model QuotationService {
|
|||
refServiceId String
|
||||
refService Service @relation(fields: [refServiceId], references: [id])
|
||||
|
||||
quotation Quotation @relation(fields: [quotationId], references: [id])
|
||||
quotation Quotation @relation(fields: [quotationId], references: [id], onDelete: Cascade)
|
||||
quotationId String
|
||||
}
|
||||
|
||||
|
|
@ -869,7 +869,7 @@ model QuotationServiceWork {
|
|||
name String
|
||||
attributes Json?
|
||||
|
||||
service QuotationService @relation(fields: [serviceId], references: [id])
|
||||
service QuotationService @relation(fields: [serviceId], references: [id], onDelete: Cascade)
|
||||
serviceId String
|
||||
|
||||
productOnWork QuotationServiceWorkProduct[]
|
||||
|
|
@ -877,7 +877,7 @@ model QuotationServiceWork {
|
|||
|
||||
model QuotationServiceWorkProduct {
|
||||
order Int
|
||||
work QuotationServiceWork @relation(fields: [workId], references: [id])
|
||||
work QuotationServiceWork @relation(fields: [workId], references: [id], onDelete: Cascade)
|
||||
workId String
|
||||
product Product @relation(fields: [productId], references: [id], onDelete: Cascade)
|
||||
productId String
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue