This commit is contained in:
2026-07-22 13:58:38 -03:00
parent 4be043edf3
commit 14a36b68b5
10 changed files with 676 additions and 178 deletions

View File

@@ -45,6 +45,7 @@ model Comanda {
nomeCliente String?
status String @default("ABERTA") // ABERTA, FECHADA, PAGA, CANCELADA
total Float @default(0.0)
valorPago Float @default(0.0)
desconto Float @default(0.0)
acrescimo Float @default(0.0)
taxaServico Boolean @default(false)
@@ -53,6 +54,7 @@ model Comanda {
criadoEm DateTime @default(now())
fechadoEm DateTime?
itens ItemPedido[]
pagamentos Pagamento[]
}
model ItemPedido {
@@ -67,3 +69,13 @@ model ItemPedido {
comanda Comanda @relation(fields: [comandaId], references: [id])
criadoEm DateTime @default(now())
}
model Pagamento {
id String @id @default(uuid())
comandaId String
comanda Comanda @relation(fields: [comandaId], references: [id])
valor Float
formaPagamento String // DINHEIRO, CARTAO_CREDITO, CARTAO_DEBITO, PIX
observacao String?
criadoEm DateTime @default(now())
}