"feat: enhance invoice management with schema updates, seed data, and new APIs"
This commit is contained in:
@@ -786,8 +786,8 @@ model AddressItem {
|
||||
addressType String?
|
||||
CheckoutState CheckoutState[]
|
||||
checkoutStateId Int?
|
||||
InvoiceTo Invoice[] @relation("invoice_to")
|
||||
InvoiceFrom Invoice[] @relation("invoice_from")
|
||||
// InvoiceTo Invoice[] @relation("invoice_to")
|
||||
// InvoiceFrom Invoice[] @relation("invoice_from")
|
||||
}
|
||||
|
||||
model SocialLink {
|
||||
@@ -887,40 +887,45 @@ model InvoiceTableFilters {
|
||||
}
|
||||
|
||||
model InvoiceItem {
|
||||
id Int @id @default(autoincrement())
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
id String @id @default(uuid())
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
//
|
||||
title String
|
||||
price Float
|
||||
total Float
|
||||
service String
|
||||
quantity Int
|
||||
description String
|
||||
Invoice Invoice? @relation(fields: [invoiceId], references: [id])
|
||||
invoiceId Int?
|
||||
}
|
||||
|
||||
model Invoice {
|
||||
id Int @id @default(autoincrement())
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
//
|
||||
sent Int
|
||||
taxes Float
|
||||
status String
|
||||
subtotal Float
|
||||
discount Float
|
||||
shipping Float
|
||||
subtotal Float
|
||||
totalAmount Float
|
||||
dueDate DateTime
|
||||
items Json[]
|
||||
invoiceNumber String
|
||||
items InvoiceItem[]
|
||||
createDate DateTime
|
||||
invoiceTo AddressItem[] @relation("invoice_to")
|
||||
invoiceFrom AddressItem[] @relation("invoice_from")
|
||||
invoiceFrom Json
|
||||
invoiceTo Json
|
||||
sent Float
|
||||
dueDate DateTime @default(now())
|
||||
createdDate DateTime @default(now())
|
||||
}
|
||||
|
||||
// model Invoice {
|
||||
// id Int @id @default(autoincrement())
|
||||
// createdAt DateTime @default(now())
|
||||
// updatedAt DateTime @updatedAt
|
||||
// //
|
||||
// sent Int
|
||||
// taxes Float
|
||||
// status String
|
||||
// subtotal Float
|
||||
// discount Float
|
||||
// shipping Float
|
||||
// totalAmount Float
|
||||
// dueDate DateTime
|
||||
// invoiceNumber String
|
||||
// items InvoiceItem[]
|
||||
// createDate DateTime
|
||||
// invoiceTo AddressItem[] @relation("invoice_to")
|
||||
// invoiceFrom AddressItem[] @relation("invoice_from")
|
||||
// }
|
||||
|
||||
// job.ts
|
||||
model JobFilters {
|
||||
id Int @id @default(autoincrement())
|
||||
|
Reference in New Issue
Block a user