hrms-api-kpi/src/entities/kpiUserEvaluationReasonCapacity.ts
2024-06-19 10:17:15 +07:00

93 lines
2.1 KiB
TypeScript

import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { KpiUserCapacity } from "./kpiUserCapacity";
@Entity("kpiUserEvaluationReasonCapacity")
export class KpiUserEvaluationReasonCapacity 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,
})
score: 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 DONE",
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)ของตาราง kpiUserCapacity",
default: null,
})
kpiUserCapacityId: string;
@ManyToOne(
() => KpiUserCapacity,
(kpiUserCapacity) => kpiUserCapacity.kpiUserEvaluationReasonCapacitys,
)
@JoinColumn({ name: "kpiUserCapacityId" })
kpiUserCapacity: KpiUserCapacity;
}
export class updateKpiUserReasonEvaluation {
@Column()
reason?: string | null;
@Column()
topic?: string | null;
@Column()
score?: string | null;
}