new ep api to assign and cancel table

This commit is contained in:
2026-01-28 12:51:55 -06:00
parent d322b39aeb
commit 630040857a
8 changed files with 69 additions and 12 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ import { Entity, PrimaryColumn, Column, OneToMany } from 'typeorm';
@Entity({ name: 'mesa' })
export class Mesa {
@PrimaryColumn({ name: 'id_mesa', type: 'int' })
idMesa: number;
id_mesa: number;
@Column({ name: 'activo', type: 'tinyint', default: 1 })
activo: boolean;
+1 -1
View File
@@ -20,7 +20,7 @@ export class MesaService {
}
async updateActivo(id: number, updateMesaDto: UpdateMesaDto) {
const mesa = await this.mesaRepository.findOne({ where: { idMesa: id } });
const mesa = await this.mesaRepository.findOne({ where: { id_mesa: id } });
if (!mesa) {
throw new NotFoundException(`La mesa no fue encontrada`);
}