refactor: invoice relation (#2)
* refactor: update database table * refactor: update invoice to have relation with installments * chore: add migration
This commit is contained in:
parent
ba41bf45cb
commit
824727582d
6 changed files with 106 additions and 163 deletions
|
|
@ -1194,12 +1194,14 @@ model Quotation {
|
|||
model QuotationPaySplit {
|
||||
id String @id @default(cuid())
|
||||
|
||||
no Int
|
||||
amount Float
|
||||
invoice Boolean @default(false)
|
||||
no Int
|
||||
amount Float
|
||||
|
||||
quotation Quotation? @relation(fields: [quotationId], references: [id], onDelete: Cascade)
|
||||
quotationId String?
|
||||
|
||||
invoice Invoice? @relation(fields: [invoiceId], references: [id])
|
||||
invoiceId String?
|
||||
}
|
||||
|
||||
model QuotationWorker {
|
||||
|
|
@ -1238,9 +1240,6 @@ model QuotationProductServiceList {
|
|||
|
||||
worker QuotationProductServiceWorker[]
|
||||
requestWork RequestWork[]
|
||||
|
||||
invoice Invoice? @relation(fields: [invoiceId], references: [id])
|
||||
invoiceId String?
|
||||
}
|
||||
|
||||
model QuotationProductServiceWorker {
|
||||
|
|
@ -1259,7 +1258,7 @@ model Invoice {
|
|||
quotation Quotation @relation(fields: [quotationId], references: [id])
|
||||
quotationId String
|
||||
|
||||
productServiceList QuotationProductServiceList[]
|
||||
installments QuotationPaySplit[]
|
||||
|
||||
amount Float?
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue