import { Entity, PrimaryColumn, Column } from "typeorm"; @Entity("usu_historial_puntos", { synchronize: false }) export class UsuHistorialPuntos { @PrimaryColumn({ name: "id_historial", type: "int" }) id: number; @Column({ name: "uid", type: "varchar", length: 32 }) uid: string; @Column({ name: "fecha", type: "datetime" }) fecha: Date; @Column({ name: "fecha_vencimiento", type: "datetime" }) fechaVencimiento: Date; @Column({ name: "puntos", type: "int" }) puntos: number; @Column({ name: "balance_puntos", type: "int" }) balancePuntos: number; @Column({ name: "id_estado_puntos", type: "int" }) idEstadoPuntos: number; @Column({ name: "tipo", type: "varchar", length: 10 }) tipo: string; @Column({ name: "id_premio", type: "int" }) idPremio: number; @Column({ name: "uid_cms", type: "varchar", length: 32}) uidCms: string; @Column({ name: "accion_red", type: "varchar", length: 2}) accionRed: string; @Column({ name: "valor", type: "int"}) valor: number; @Column({ name: "id_comercio", type: "int"}) idComercio: number; @Column({ name: "id_sucursal", type: "int"}) idSucursal: number; @Column({ name: "ip_cajero", type: "varchar", length: 15}) ipCajero: string; @Column({ name: "factura", type: "varchar", length: 100}) factura: string; @Column({ name: "nota", type: "varchar", length: 200}) nota: string; @Column({ name: "id_franquicia", type: "int"}) idFranquicia: number; @Column({ name: "id_tipo_transaccion", type: "int"}) idTipoTransaccion: number; constructor( id: number, uid: string, fecha: string, fechaVencimiento: Date, puntos: number, balancePuntos: number, idEstadoPuntos: number, tipo: string, idPremio: number, uidCms: string, accionRed: string, valor: number, idComercio: number, idSucursal: number, ipCajero: string, factura: string, nota: string, idFranquicia: number, idTipoTransaccion: number ) { this.id = 0; this.uid = uid; this.fecha = new Date(); this.fechaVencimiento = fechaVencimiento; this.puntos = puntos; this.balancePuntos = balancePuntos; this.idEstadoPuntos = idEstadoPuntos; this.tipo = tipo; this.idPremio = idPremio; this.uidCms = uidCms; this.accionRed = accionRed; this.valor= valor; this.idComercio = idComercio; this.idSucursal = idSucursal; this.ipCajero = ipCajero; this.factura = factura; this.nota = nota; this.idFranquicia = idFranquicia; this.idTipoTransaccion = idTipoTransaccion; } }