add devproject

This commit is contained in:
Kittapath 2024-07-17 12:47:23 +07:00
parent 7092d67973
commit 0ded2dc6b0
4 changed files with 152 additions and 1 deletions

View file

@ -0,0 +1,41 @@
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { KpiUserDevelopment } from "./kpiUserDevelopment";
@Entity("developmentProject")
export class DevelopmentProject extends EntityBase {
@Column({
// TRAINING = การอบรม
// MEETING = การประชุม
// SEMINAR = การสัมมนา
// STUDY_TOUR = การศึกษาดูงาน
// ACADEMIC_SEMINAR = การสัมมนาทางวิชาการ
// WORKSHOP = การสัมมนาเชิงปฏิบัติการ
// SPECIAL_LECTURE = การบรรยายพิเศษ
// LECTURE = การบรรยาย
// STUDY_TRAINING = การฝึกศึกษา
// OTHER = อื่น
nullable: true,
comment: "เทคนิควิธีการที่ใช้ในการพัฒนา",
default: null,
})
name: string;
@Column({
nullable: true,
comment: "โครงการ/หลักสูตรการฝึกอบรม",
default: null,
})
kpiUserDevelopmentId: string;
@ManyToOne(
() => KpiUserDevelopment,
(kpiUserDevelopment: KpiUserDevelopment) => kpiUserDevelopment.developmentProjects,
)
@JoinColumn({ name: "kpiUserDevelopmentId" })
kpiUserDevelopment: KpiUserDevelopment;
}
export class CreateDevelopmentProject {
@Column()
name: string;
}

View file

@ -2,6 +2,7 @@ import { Entity, Column, ManyToOne, JoinColumn, OneToMany } from "typeorm";
import { EntityBase } from "./base/Base";
import { KpiUserEvaluation } from "./kpiUserEvaluation";
import { KpiUserEvaluationReasonDevelopment } from "./kpiUserEvaluationReasonDevelopment";
import { DevelopmentProject } from "./developmentProject";
@Entity("kpiUserDevelopment")
export class KpiUserDevelopment extends EntityBase {
@ -73,6 +74,33 @@ export class KpiUserDevelopment extends EntityBase {
})
isDevelopment10: boolean;
@Column({
nullable: true,
comment: "รายละเอียดอื่นๆ 70 แผน",
default: null,
})
reasonDevelopment70: string;
@Column({
nullable: true,
comment: "รายละเอียดอื่นๆ 20 แผน",
default: null,
})
reasonDevelopment20: string;
@Column({
nullable: true,
comment: "รายละเอียดอื่นๆ 10 แผน",
default: null,
})
reasonDevelopment10: string;
@OneToMany(
() => DevelopmentProject,
(developmentProject: DevelopmentProject) => developmentProject.kpiUserDevelopment,
)
developmentProjects: DevelopmentProject[];
@Column({
nullable: true,
length: 40,
@ -104,6 +132,14 @@ export class CreateKpiUserDevelopment {
@Column()
achievement0?: string | null;
@Column()
developmentProjects?: string[];
@Column()
reasonDevelopment70?: string;
@Column()
reasonDevelopment20?: string;
@Column()
reasonDevelopment10?: string;
@Column()
isDevelopment70: boolean;
@Column()
isDevelopment20: boolean;
@ -125,6 +161,14 @@ export class UpdateKpiUserDevelopment {
@Column()
achievement0?: string | null;
@Column()
developmentProjects?: string[];
@Column()
reasonDevelopment70?: string;
@Column()
reasonDevelopment20?: string;
@Column()
reasonDevelopment10?: string;
@Column()
isDevelopment70: boolean;
@Column()
isDevelopment20: boolean;