import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from "typeorm"; import { BusinessTypeProduct } from "./BusinessTypeProduct"; @Entity({ name: "business_type", comment: "Almacenar los tipos de negocio qué se van a poder agregar en asumano.", }) export class BusinessType { @PrimaryGeneratedColumn({ type: "int", comment: "Número de identificación (ID) único de cada registro.", }) id: number; @Column({ length: 50, type: "varchar", comment: "Nombre del tipo de negocio.", }) name: string; @Column({ type: "text", nullable: true, default: null, comment: "Descripción del tipo de negocio.", }) description: string | null; @Column({ default: 1, type: "int", width: 1, comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.", }) status: number; @OneToMany( () => BusinessTypeProduct, (businessTypeProduct) => businessTypeProduct.business_type ) business_types_product: BusinessTypeProduct[]; }