migrate
This commit is contained in:
parent
2f1053c7dc
commit
21c72f2a1e
4 changed files with 293 additions and 0 deletions
187
src/entities/kpiSpecial.ts
Normal file
187
src/entities/kpiSpecial.ts
Normal file
|
|
@ -0,0 +1,187 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { KpiUserEvaluation } from "./kpiUserEvaluation";
|
||||
|
||||
@Entity("kpiSpecial")
|
||||
export class KpiSpecial extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "รหัสตัวชี้วัด",
|
||||
default: null,
|
||||
})
|
||||
including: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ชื่อตัวชี้วัด",
|
||||
default: null,
|
||||
})
|
||||
includingName: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ค่าเป้าหมาย",
|
||||
default: null,
|
||||
})
|
||||
target: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "หน่วยนับ",
|
||||
default: null,
|
||||
})
|
||||
unit: number;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "น้ำหนัก",
|
||||
default: null,
|
||||
})
|
||||
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: "นิยามหรือความหมาย",
|
||||
default: null,
|
||||
})
|
||||
meaning: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "สูตรคำนวณ",
|
||||
default: null,
|
||||
})
|
||||
formula: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง kpiUserEvaluation",
|
||||
default: null,
|
||||
})
|
||||
kpiUserEvaluationId: string;
|
||||
|
||||
@ManyToOne(() => KpiUserEvaluation, (kpiUserEvaluation) => kpiUserEvaluation.kpiUserSpecials)
|
||||
@JoinColumn({ name: "kpiUserEvaluationId" })
|
||||
kpiUserEvaluation: KpiUserEvaluation;
|
||||
}
|
||||
|
||||
export class CreateKpiUserSpecial {
|
||||
@Column()
|
||||
including: string | null;
|
||||
@Column()
|
||||
includingName: string | null;
|
||||
@Column()
|
||||
achievement1: string | null;
|
||||
@Column()
|
||||
achievement2: string | null;
|
||||
@Column()
|
||||
achievement3: string | null;
|
||||
@Column()
|
||||
achievement4: string | null;
|
||||
@Column()
|
||||
achievement5: string | null;
|
||||
@Column()
|
||||
target: string;
|
||||
@Column()
|
||||
unit: number;
|
||||
@Column()
|
||||
weight: number;
|
||||
@Column()
|
||||
meaning: string;
|
||||
@Column()
|
||||
formula: string;
|
||||
@Column("uuid")
|
||||
kpiUserEvaluationId: string;
|
||||
}
|
||||
|
||||
export class UpdateKpiUserSpecial {
|
||||
@Column()
|
||||
including: string | null;
|
||||
@Column()
|
||||
includingName: string | null;
|
||||
@Column()
|
||||
achievement1: string | null;
|
||||
@Column()
|
||||
achievement2: string | null;
|
||||
@Column()
|
||||
achievement3: string | null;
|
||||
@Column()
|
||||
achievement4: string | null;
|
||||
@Column()
|
||||
achievement5: string | null;
|
||||
@Column()
|
||||
target: string;
|
||||
@Column()
|
||||
unit: number;
|
||||
@Column()
|
||||
weight: number;
|
||||
@Column()
|
||||
meaning: string;
|
||||
@Column()
|
||||
formula: string;
|
||||
@Column("uuid")
|
||||
kpiUserEvaluationId: string;
|
||||
}
|
||||
|
||||
export class KpiUserSpecialDataPoint {
|
||||
id: string;
|
||||
point: number;
|
||||
}
|
||||
|
|
@ -101,6 +101,41 @@ export class KpiUserPlanned extends EntityBase {
|
|||
default: null,
|
||||
})
|
||||
endDate: Date;
|
||||
|
||||
@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;
|
||||
}
|
||||
|
||||
export class CreateKpiUserPlanned {
|
||||
|
|
|
|||
|
|
@ -102,6 +102,41 @@ export class KpiUserRole extends EntityBase {
|
|||
default: null,
|
||||
})
|
||||
endDate: Date;
|
||||
|
||||
@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;
|
||||
}
|
||||
|
||||
export class CreateKpiUserRole {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue