import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from "typeorm"; import { PartnerPlatformSection } from ".."; @Entity("partner_platform", { comment: "Tabla creada para agregar las plataformas de los usuarios.", }) export class PartnerPlatform { @PrimaryGeneratedColumn({ type: "int", comment: "Número de identificación (ID) único de cada registro.", }) id: number; @Column({ length: 10, type: "varchar", unique: true, comment: "Código de la sección.", }) code: string; @Column({ length: 40, type: "varchar", comment: "Id de la variable que se encuentra en los archivos `locale` para el multilenguaje.", }) name: string; @Column({ length: 40, type: "varchar", comment: "Id de la variable que se encuentra en los archivos `locale` para el multilenguaje.", nullable: true, default: null, }) description: string | null; @Column({ length: 20, type: "varchar", comment: "Icono de la sección para los permisos.", nullable: true, default: null, }) icon: string | null; @Column({ default: 1, type: "int", width: 1, comment: "Estado en el que se encuentra el registro:\r\n1. Activo: El partner tiene acceso.\r\n0. Inactivo: El partner no tiene acceso a la plataforma.", }) status: number; @OneToMany( () => PartnerPlatformSection, (partnerPlatformSection) => partnerPlatformSection.platform ) partner_platform_sections: PartnerPlatformSection[]; }