new ep api to assign and cancel table
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user