feat: Add 'atas' (minutes/records) management feature, and implement various improvements across UI, backend logic, and authentication.
This commit is contained in:
28
packages/backend/convex/tables/objetos.ts
Normal file
28
packages/backend/convex/tables/objetos.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { defineTable } from 'convex/server';
|
||||
import { v } from 'convex/values';
|
||||
|
||||
export const objetosTables = {
|
||||
objetos: defineTable({
|
||||
nome: v.string(),
|
||||
valorEstimado: v.string(),
|
||||
tipo: v.union(v.literal('material'), v.literal('servico')),
|
||||
codigoEfisco: v.string(),
|
||||
codigoCatmat: v.optional(v.string()),
|
||||
codigoCatserv: v.optional(v.string()),
|
||||
unidade: v.string(),
|
||||
criadoPor: v.id('usuarios'),
|
||||
criadoEm: v.number()
|
||||
})
|
||||
.searchIndex('search_nome', { searchField: 'nome' })
|
||||
.index('by_nome', ['nome'])
|
||||
.index('by_tipo', ['tipo']),
|
||||
|
||||
acoes: defineTable({
|
||||
nome: v.string(),
|
||||
tipo: v.union(v.literal('projeto'), v.literal('lei')),
|
||||
criadoPor: v.id('usuarios'),
|
||||
criadoEm: v.number()
|
||||
})
|
||||
.index('by_nome', ['nome'])
|
||||
.index('by_tipo', ['tipo'])
|
||||
};
|
||||
Reference in New Issue
Block a user