import { Entity, Column, ManyToOne, JoinColumn } from "typeorm"; import { EntityBase } from "./base/Base"; import { KpiUserPlanned } from "./kpiUserPlanned"; @Entity("kpiUserEvaluationReasonPlan") export class KpiUserEvaluationReasonPlan extends EntityBase { @Column({ nullable: true, comment: "หัวข้อ", length: 255, default: null, }) topic: string; @Column({ nullable: true, comment: "หมายเหตุ", length: 255, default: null, }) reason: string; @Column({ nullable: true, comment: "หมายเหตุ ผู้ประเมิน", length: 255, default: null, }) reasonEvaluator: string; @Column({ nullable: true, comment: "หมายเหตุ ผู้บังคับบัญชาเหนือขึ้นไป", length: 255, default: null, }) reasonCommander: string; @Column({ nullable: true, comment: "หมายเหตุ ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง", length: 255, default: null, }) reasonCommanderHigh: string; @Column({ nullable: true, comment: "สถานะ DRAFT EVALUATOR COMMANDER COMMANDERHIGH", length: 255, default: "DRAFT", }) status: string; @Column({ nullable: true, comment: "ประเภท PROGRESS PROBLEM", length: 255, default: null, }) type: string; @Column({ nullable: true, length: 40, comment: "คีย์นอก(FK)ของตาราง kpiUserPlan", default: null, }) kpiUserPlannedId: string; @ManyToOne(() => KpiUserPlanned, (kpiUserPlanned) => kpiUserPlanned.kpiUserEvaluationReasonPlans) @JoinColumn({ name: "kpiUserPlannedId" }) kpiUserPlanned: KpiUserPlanned; }