init
This commit is contained in:
@@ -6,14 +6,11 @@ model SalesInvoice {
|
||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||
customerId Int?
|
||||
posAccountId Int
|
||||
customer Customer? @relation(fields: [customerId], references: [id])
|
||||
posAccount PosAccount @relation(fields: [posAccountId], references: [id])
|
||||
items SalesInvoiceItem[]
|
||||
salesInvoicePayments SalesInvoicePayment[]
|
||||
|
||||
@@index([customerId])
|
||||
@@index([posAccountId])
|
||||
@@map("Sales_Invoices")
|
||||
}
|
||||
|
||||
@@ -24,12 +21,13 @@ model SalesInvoiceItem {
|
||||
totalAmount Decimal @default(0.00) @db.Decimal(15, 2)
|
||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||
invoiceId Int
|
||||
productId Int
|
||||
goodId Int
|
||||
serviceId Int
|
||||
invoice SalesInvoice @relation(fields: [invoiceId], references: [id])
|
||||
product Product @relation(fields: [productId], references: [id])
|
||||
good Good? @relation(fields: [goodId], references: [id])
|
||||
service Service? @relation(fields: [serviceId], references: [id])
|
||||
|
||||
@@index([invoiceId])
|
||||
@@index([productId])
|
||||
@@index([invoiceId, goodId])
|
||||
@@map("Sales_Invoice_Items")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user