hrms-api-kpi/src/entities/kpiUserEvaluationReasonSpecial.ts
2024-05-08 23:48:19 +07:00

76 lines
1.8 KiB
TypeScript

import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { KpiUserSpecial } from "./kpiUserSpecial";
@Entity("kpiUserEvaluationReasonSpecial")
export class KpiUserEvaluationReasonSpecial 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)ของตาราง kpiUserSpecial",
default: null,
})
kpiUserSpecialId: string;
@ManyToOne(
() => KpiUserSpecial,
(kpiUserSpecial) => kpiUserSpecial.kpiUserEvaluationReasonSpecials,
)
@JoinColumn({ name: "kpiUserSpecialId" })
kpiUserSpecial: KpiUserSpecial;
}