feat: importar csv y auditar ediciones
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import Dexie, { type Table } from 'dexie';
|
||||
import type { Productor, Producto, MovimientoInventario, Venta, VentaLinea, Gasto, Ajuste, CuadreCaja, JornadaToldo } from '@toldo/core';
|
||||
import type { Productor, Producto, MovimientoInventario, Venta, VentaLinea, Gasto, Ajuste, CuadreCaja, JornadaToldo, Auditoria } from '@toldo/core';
|
||||
|
||||
export class ToldoDB extends Dexie {
|
||||
productores!: Table<Productor, string>;
|
||||
@@ -11,6 +11,7 @@ export class ToldoDB extends Dexie {
|
||||
ajustes!: Table<Ajuste, string>;
|
||||
cuadres!: Table<CuadreCaja, string>;
|
||||
jornadas!: Table<JornadaToldo, string>;
|
||||
auditorias!: Table<Auditoria, string>;
|
||||
|
||||
constructor() {
|
||||
super('ToldoConjuntoDB');
|
||||
@@ -35,6 +36,18 @@ export class ToldoDB extends Dexie {
|
||||
cuadres: 'id, fecha',
|
||||
jornadas: 'id, fecha, estado'
|
||||
});
|
||||
this.version(3).stores({
|
||||
productores: 'id, nombre, activo',
|
||||
productos: 'id, productorId, nombrePresentacion, [productorId+nombrePresentacion]',
|
||||
movimientosInventario: 'id, fecha, tipo, productoId',
|
||||
ventas: 'id, fecha',
|
||||
ventaLineas: 'id, ventaId, productoId, formaPago',
|
||||
gastos: 'id, fecha',
|
||||
ajustes: 'id, fecha, productoId',
|
||||
cuadres: 'id, fecha',
|
||||
jornadas: 'id, fecha, estado',
|
||||
auditorias: 'id, entidad, registroId, fecha'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user