filtro em produtos, bug tela de preparo, nome do user nas comandas e itens

This commit is contained in:
2026-07-23 12:50:26 -03:00
parent 14a36b68b5
commit 14e92c91fd
8 changed files with 407 additions and 31 deletions

View File

@@ -15,6 +15,8 @@ model Usuario {
role String @default("GARCOM") // ADMIN, CAIXA, GARCOM, COZINHA, BARMAN
ativo Boolean @default(true)
criadoEm DateTime @default(now())
comandas Comanda[]
itensPedido ItemPedido[]
}
model Categoria {
@@ -53,6 +55,8 @@ model Comanda {
motivoCancelamento String?
criadoEm DateTime @default(now())
fechadoEm DateTime?
usuarioId String?
usuario Usuario? @relation(fields: [usuarioId], references: [id])
itens ItemPedido[]
pagamentos Pagamento[]
}
@@ -67,6 +71,8 @@ model ItemPedido {
produto Produto @relation(fields: [produtoId], references: [id])
comandaId String
comanda Comanda @relation(fields: [comandaId], references: [id])
usuarioId String?
usuario Usuario? @relation(fields: [usuarioId], references: [id])
criadoEm DateTime @default(now())
}