feat: Introduce structured table definitions in convex/tables for various entities and remove the todos example table.
This commit is contained in:
16
packages/backend/convex/tables/enderecos.ts
Normal file
16
packages/backend/convex/tables/enderecos.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { defineTable } from 'convex/server';
|
||||
import { v } from 'convex/values';
|
||||
|
||||
export const enderecosTables = {
|
||||
enderecos: defineTable({
|
||||
cep: v.string(),
|
||||
logradouro: v.string(),
|
||||
numero: v.string(),
|
||||
complemento: v.optional(v.string()),
|
||||
bairro: v.string(),
|
||||
cidade: v.string(),
|
||||
uf: v.string(),
|
||||
criadoPor: v.optional(v.id('usuarios')),
|
||||
atualizadoPor: v.optional(v.id('usuarios'))
|
||||
}).index('by_cep', ['cep'])
|
||||
};
|
||||
Reference in New Issue
Block a user