feat(clientes-maestro): importar y exportar clientes del archivo maestro
- Tabla ClienteMaestro (27 campos, unique numCliente) - Importador Excel: 1535 clientes del Reporte maestro - API: listar/filtros/exportar/detalle/importar - Frontend: tabla paginada, filtros, exportar Excel - Dark mode completo, 52 tests verdes
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
-- Tabla de clientes maestro (importado desde Excel).
|
||||
-- Patrón manual: sqlite3 + _prisma_migrations. NUNCA migrate dev.
|
||||
|
||||
-- CreateTable ClienteMaestro
|
||||
CREATE TABLE IF NOT EXISTS "ClienteMaestro" (
|
||||
"id" TEXT NOT NULL PRIMARY KEY,
|
||||
"numCliente" TEXT NOT NULL,
|
||||
"nombre" TEXT NOT NULL,
|
||||
"apellidoPaterno" TEXT NOT NULL,
|
||||
"apellidoMaterno" TEXT,
|
||||
"sexo" TEXT,
|
||||
"telefono" TEXT,
|
||||
"email" TEXT,
|
||||
"estadoCivil" TEXT,
|
||||
"rangoEdad" TEXT,
|
||||
"ocupacion" TEXT,
|
||||
"rangoIngresos" TEXT,
|
||||
"credito" TEXT,
|
||||
"institucion" TEXT,
|
||||
"medioContacto" TEXT,
|
||||
"canal" TEXT,
|
||||
"desarrollo" TEXT,
|
||||
"manzana" TEXT,
|
||||
"lote" TEXT,
|
||||
"interior" TEXT,
|
||||
"tipoCasa" TEXT,
|
||||
"etapa" TEXT,
|
||||
"valorTotal" REAL,
|
||||
"estatus" TEXT,
|
||||
"fechaLiberacion" DATETIME,
|
||||
"vendedor" TEXT,
|
||||
"vendedorId" TEXT,
|
||||
"importadoEn" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS "ClienteMaestro_numCliente_key" ON "ClienteMaestro"("numCliente");
|
||||
CREATE INDEX IF NOT EXISTS "ClienteMaestro_desarrollo_idx" ON "ClienteMaestro"("desarrollo");
|
||||
CREATE INDEX IF NOT EXISTS "ClienteMaestro_estatus_idx" ON "ClienteMaestro"("estatus");
|
||||
CREATE INDEX IF NOT EXISTS "ClienteMaestro_vendedor_idx" ON "ClienteMaestro"("vendedor");
|
||||
@@ -443,3 +443,40 @@ model PushSubscription {
|
||||
@@unique([usuarioId])
|
||||
@@index([usuarioId])
|
||||
}
|
||||
|
||||
// ── Clientes Maestro (importado desde Excel) ──────────────────────────
|
||||
|
||||
model ClienteMaestro {
|
||||
id String @id @default(uuid())
|
||||
numCliente String @unique
|
||||
nombre String
|
||||
apellidoPaterno String
|
||||
apellidoMaterno String?
|
||||
sexo String?
|
||||
telefono String?
|
||||
email String?
|
||||
estadoCivil String?
|
||||
rangoEdad String?
|
||||
ocupacion String?
|
||||
rangoIngresos String?
|
||||
credito String?
|
||||
institucion String?
|
||||
medioContacto String?
|
||||
canal String?
|
||||
desarrollo String?
|
||||
manzana String?
|
||||
lote String?
|
||||
interior String?
|
||||
tipoCasa String?
|
||||
etapa String?
|
||||
valorTotal Float?
|
||||
estatus String?
|
||||
fechaLiberacion DateTime?
|
||||
vendedor String?
|
||||
vendedorId String?
|
||||
importadoEn DateTime @default(now())
|
||||
|
||||
@@index([desarrollo])
|
||||
@@index([estatus])
|
||||
@@index([vendedor])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user