import { Entity, PrimaryGeneratedColumn, Column } from "typeorm"; @Entity("com_sucursales", { synchronize: false }) export class ComercioSucursales { @PrimaryGeneratedColumn({ name: "id_sucursal", type: "int" }) id: number; @Column({ name: "id_comercio", type: "int" }) idComercio: number; @Column({ name: "nombre", type: "varchar", length: 100 }) nombre: string; @Column({ name: "email", type: "varchar", length: 150 }) email: string; @Column({ name: "direccion", type: "varchar", length: 150 }) direccion: string; @Column({ name: "id_ciudad", type: "int" }) idCiudad: number; @Column({ name: "latitud", type: "double" }) latitud: number; @Column({ name: "longitud", type: "double" }) longitud: number; @Column({ name: "hora_desde", type: "time" }) horaDesde: Date; @Column({ name: "hora_hasta", type: "time" }) horaHasta: Date; @Column({ name: "telefono", type: "varchar", length: 20 }) telefono: string; @Column({ name: "comentarios", type: "varchar", length: 240 }) comentarios: string; @Column({ name: "estado", type: "varchar", length: 10 }) estado: string; @Column({ name: "estado_admin", type: "varchar", length: 10 }) estadoAdmin: string; @Column({ name: "id_franquicia", type: "int" }) idFranquicia: number; @Column({ name: "fecha_creacion", type: "datetime" }) fechaCreacion: Date; @Column({ name: "camara_dispositivo", type: "varchar", length: 1 }) camaraDispositivo: string; @Column({ name: "codigo_credibanco", type: "varchar", length: 45 }) codigoCredibanco: string; @Column({ name: "pos_integrado", type: "enum" }) posIntegrado: string; @Column({ name: "fecha_apagado", type: "timestamp" }) fechaApagado: Date; constructor( idComercio: number, nombre: string, email: string, direccion: string, idCiudad: number, latitud: number, longitud: number, horaDesde: Date, horaHasta: Date, telefono: string, comentarios: string, estado: string, estadoAdmin: string, idFranquicia: number, fechaCreacion: Date, camaraDispositivo: string, codigoCredibanco: string, posIntegrado: string, fechaApagado: Date ) { this.id = 0; this.idComercio = idComercio; this.nombre = nombre; this.email = email; this.direccion = direccion; this.idCiudad = idCiudad; this.latitud = latitud; this.longitud = longitud; this.horaDesde = horaDesde; this.horaHasta = horaHasta; this.telefono = telefono; this.comentarios = comentarios; this.estado = estado; this.estadoAdmin = estadoAdmin; this.idFranquicia = idFranquicia; this.fechaCreacion = fechaCreacion; this.camaraDispositivo = camaraDispositivo; this.codigoCredibanco = codigoCredibanco; this.posIntegrado = posIntegrado; this.fechaApagado = fechaApagado; } }