import { Entity, PrimaryGeneratedColumn, Column } from "typeorm"; @Entity("usu_regalos", { synchronize: false }) export class UsuarioRegalos { @PrimaryGeneratedColumn({ name: "id_regalo", type: "int" }) id: number; @Column({ name: "id_comercio", type: "int" }) idComercio: number; @Column({ name: "uid_destino", type: "varchar", length: 32 }) uidDestino: string; @Column({ name: "uid_origen", type: "varchar", length: 32 }) uidOrigen: string; @Column({ name: "id_premio", type: "int" }) idPremio: number; @Column({ name: "puntos", type: "int" }) puntos: number; @Column({ name: "fecha", type: "datetime" }) fecha: Date; @Column({ name: "aceptado", type: "varchar", length: 2 }) aceptado: string; @Column({ name: "fecha_aceptado", type: "datetime" }) fechaAceptado: Date; @Column({ name: "canjeado", type: "varchar", length: 2 }) canjeado: string; @Column({ name: "fecha_canjeado", type: "datetime" }) fechaCanjeado: Date; constructor( idComercio: number, uidDestino: string, uidOrigen: string, idPremio: number, puntos: number, fecha: Date, aceptado: string, fechaAceptado: Date, canjeado: string, fechaCanjeado: Date ) { this.id = 0; this.idComercio = idComercio; this.uidDestino = uidDestino; this.uidOrigen = uidOrigen; this.idPremio = idPremio; this.puntos = puntos; this.fecha = fecha; this.aceptado = aceptado; this.fechaAceptado = fechaAceptado; this.canjeado = canjeado; this.fechaCanjeado = fechaCanjeado; } }