แก้ db special

This commit is contained in:
Kittapath 2024-04-23 15:52:37 +07:00
parent d16df4ee44
commit 133fc76f66
4 changed files with 107 additions and 388 deletions

View file

@ -1,10 +1,23 @@
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { KpiUserEvaluation } from "./kpiUserEvaluation";
import { KpiSpecial } from "./kpiSpecial";
@Entity("kpiUserSpecial")
export class KpiUserSpecial extends EntityBase {
@Column({
nullable: true,
comment: "รหัสตัวชี้วัด",
default: null,
})
including: string;
@Column({
nullable: true,
comment: "ชื่อตัวชี้วัด",
default: null,
})
includingName: string;
@Column({
nullable: true,
comment: "ค่าเป้าหมาย",
@ -26,6 +39,63 @@ export class KpiUserSpecial extends EntityBase {
})
weight: number;
@Column({
nullable: true,
comment: "ระดับที่คาดหวัง",
default: null,
})
level: string;
@Column({
nullable: true,
comment: "ระดับคะแนน",
default: null,
})
point: number;
@Column({
type: "double",
nullable: true,
default: null,
comment: "ผลการประเมิน",
})
summary: number;
@Column({
nullable: true,
comment: "ผลสำเร็จของงาน 1",
default: null,
})
achievement1: string;
@Column({
nullable: true,
comment: "ผลสำเร็จของงาน 2",
default: null,
})
achievement2: string;
@Column({
nullable: true,
comment: "ผลสำเร็จของงาน 3",
default: null,
})
achievement3: string;
@Column({
nullable: true,
comment: "ผลสำเร็จของงาน 4",
default: null,
})
achievement4: string;
@Column({
nullable: true,
comment: "ผลสำเร็จของงาน 5",
default: null,
})
achievement5: string;
@Column({
nullable: true,
comment: "นิยามหรือความหมาย",
@ -51,16 +121,4 @@ export class KpiUserSpecial extends EntityBase {
@ManyToOne(() => KpiUserEvaluation, (kpiUserEvaluation) => kpiUserEvaluation.kpiUserSpecials)
@JoinColumn({ name: "kpiUserEvaluationId" })
kpiUserEvaluation: KpiUserEvaluation;
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง kpiSpecial",
default: null,
})
kpiSpecialId: string;
@ManyToOne(() => KpiSpecial, (kpiSpecial) => kpiSpecial.kpiUserSpecials)
@JoinColumn({ name: "kpiSpecialId" })
kpiSpecial: KpiSpecial;
}