import { Entity, PrimaryGeneratedColumn, Column } from "typeorm"; @Entity("com_campanas", { synchronize: false }) export class ComercioCampanas { @PrimaryGeneratedColumn({ name: "id", type: "int" }) id: number; @Column({ name: "id_comercio", type: "int" }) idComercio: number; @Column({ name: "uid_cms", type: "varchar", length: 32 }) uidCms: string; @Column({ name: "tipo", type: "varchar", length: 10 }) tipo: string; @Column({ name: "miembros", type: "int" }) miembros: number; @Column({ name: "conversion", type: "int" }) conversion: number; @Column({ name: "fecha", type: "datetime" }) fecha: Date; @Column({ name: "asunto", type: "varchar", length: 150 }) asunto: string; @Column({ name: "estado", type: "varchar", length: 10 }) estado: string; @Column({ name: "fecha_inicio", type: "date" }) fechaInicio: Date; @Column({ name: "fecha_fin", type: "date" }) fechaFin: Date; @Column({ name: "para", type: "varchar", length: 2 }) para: string; @Column({ name: "estado_envio", type: "varchar", length: 15 }) estadoEnvio: string; @Column({ name: "id_franquicia", type: "int" }) idFranquicia: number; @Column({ name: "fecha_envio", type: "datetime" }) fechaEnvio: Date; @Column({ name: "unique_key", type: "varchar", length: 300 }) uniqueKey: string; constructor( id_comercio: number, uid_cms: string, tipo: string, miembros: number, conversion: number, fecha: Date, asunto: string, estado: string, fecha_inicio: Date, fecha_fin: Date, para: string, estado_envio: string, id_franquicia: number, fecha_envio: Date, unique_key: string ) { this.id = 0; this.idComercio = id_comercio; this.uidCms = uid_cms; this.tipo = tipo; this.miembros = miembros; this.conversion = conversion; this.fecha = fecha; this.asunto = asunto; this.estado = estado; this.fechaInicio = fecha_inicio; this.fechaFin = fecha_fin; this.para = para; this.estadoEnvio = estado_envio; this.idFranquicia = id_franquicia; this.fechaEnvio = fecha_envio; this.uniqueKey = unique_key; } }