import { Entity, PrimaryGeneratedColumn, Column } from "typeorm"; @Entity("com_premios", { synchronize: false }) export class ComercioPremios { @PrimaryGeneratedColumn({ name: "id_premio", type: "int" }) id: number; @Column({ name: "id_comercio", type: "int" }) idComercio: number; @Column({ name: "imagen", type: "varchar", length: 300 }) imagen: string; @Column({ name: "premio", type: "varchar", length: 100 }) premio: string; @Column({ name: "descripcion_premio", type: "varchar", length: 300 }) descripcion: string; @Column({ name: "estado", type: "varchar", length: 15 }) estado: string; @Column({ name: "puntos", type: "int" }) puntos: number; @Column({ name: "uid_cms", type: "varchar", length: 32 }) uidCms: string; @Column({ name: "fecha_creacion", type: "datetime" }) fechaCreacion: Date; @Column({ name: "fecha_inicio", type: "date" }) fechaInicio: Date; @Column({ name: "fecha_fin", type: "date" }) fechaFin: Date; @Column({ name: "codigo_premio", type: "text" }) codigoPremio: string; @Column({ name: "marca", type: "varchar", length: 50 }) marca: string; @Column({ name: "tipo", type: "varchar", length: 50 }) tipo: string; @Column({ name: "categoria", type: "varchar", length: 50 }) categoria: string; @Column({ name: "nivel", type: "int" }) nivel: number; @Column({ name: "cadena", type: "varchar", length: 50 }) cadena: string; @Column({ name: "valor", type: "int" }) valor: number; @Column({ name: "precio", type: "int" }) precio: number; constructor( id_comercio: number, imagen: string, premio: string, descripcion: string, categoria: string, estado: string, puntos: number, uidCms: string, fechaCreacion: Date, fechaInicio: Date, fechaFin: Date, codigoPremio: string, marca: string, tipo: string, nivel: number, cadena: string, valor: number, precio: number ) { this.id = 0; this.idComercio = id_comercio; this.imagen = imagen; this.premio = premio; this.descripcion = descripcion; this.estado = estado; this.categoria = categoria; this.puntos = puntos; this.uidCms = uidCms; this.fechaCreacion = fechaCreacion; this.fechaInicio = fechaInicio; this.fechaFin = fechaFin; this.codigoPremio = codigoPremio; this.marca = marca; this.tipo = tipo; this.nivel = nivel; this.cadena = cadena; this.valor = valor; this.precio = precio; } }