feat: implement filtering and document management features in dashboard components, enhancing user experience with improved query capabilities and UI for managing documents in pedidos and compras
This commit is contained in:
@@ -70,5 +70,37 @@ export const pedidosTables = {
|
||||
})
|
||||
.index('by_pedidoId', ['pedidoId'])
|
||||
.index('by_usuarioId', ['usuarioId'])
|
||||
.index('by_data', ['data'])
|
||||
.index('by_data', ['data']),
|
||||
|
||||
// Documentos anexados diretamente ao pedido (ilimitado)
|
||||
pedidoDocumentos: defineTable({
|
||||
pedidoId: v.id('pedidos'),
|
||||
descricao: v.string(),
|
||||
nome: v.string(),
|
||||
storageId: v.id('_storage'),
|
||||
tipo: v.string(), // MIME type
|
||||
tamanho: v.number(), // bytes
|
||||
criadoPor: v.id('funcionarios'),
|
||||
criadoEm: v.number(),
|
||||
origemSolicitacaoId: v.optional(v.id('solicitacoesItens'))
|
||||
})
|
||||
.index('by_pedidoId', ['pedidoId'])
|
||||
.index('by_criadoPor', ['criadoPor'])
|
||||
.index('by_origemSolicitacaoId', ['origemSolicitacaoId']),
|
||||
|
||||
// Documentos anexados a uma solicitação (somente solicitante; pode ter mais de um)
|
||||
solicitacoesItensDocumentos: defineTable({
|
||||
requestId: v.id('solicitacoesItens'),
|
||||
pedidoId: v.id('pedidos'),
|
||||
descricao: v.string(),
|
||||
nome: v.string(),
|
||||
storageId: v.id('_storage'),
|
||||
tipo: v.string(), // MIME type
|
||||
tamanho: v.number(), // bytes
|
||||
criadoPor: v.id('funcionarios'),
|
||||
criadoEm: v.number()
|
||||
})
|
||||
.index('by_requestId', ['requestId'])
|
||||
.index('by_pedidoId', ['pedidoId'])
|
||||
.index('by_criadoPor', ['criadoPor'])
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user