no message

This commit is contained in:
kittapath 2024-08-27 09:21:22 +07:00
parent fde5f8d90a
commit 5a688215e7
9 changed files with 945 additions and 0 deletions

View file

@ -28,6 +28,7 @@ import { ProfileChildren } from "./ProfileChildren";
import { ProfileDiscipline } from "./ProfileDiscipline";
import { ProfileEmployee } from "./ProfileEmployee";
import { ProfileEdit } from "./ProfileEdit";
import { ProfileDevelopment } from "./ProfileDevelopment";
@Entity("profile")
export class Profile extends EntityBase {
@ -338,6 +339,9 @@ export class Profile extends EntityBase {
@OneToMany(() => ProfileOther, (profileOther) => profileOther.profile)
profileOthers: ProfileOther[];
@OneToMany(() => ProfileDevelopment, (profileDevelopment) => profileDevelopment.profile)
profileDevelopments: ProfileDevelopment[];
@OneToMany(() => ProfileAvatar, (profileAvatar) => profileAvatar.profile)
profileAvatars: ProfileAvatar[];

View file

@ -0,0 +1,184 @@
import { Entity, Column, OneToMany, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { Profile } from "./Profile";
import { ProfileEmployee } from "./ProfileEmployee";
import { ProfileDevelopmentHistory } from "./ProfileDevelopmentHistory";
import { DevelopmentProject } from "./developmentProject";
@Entity("profileDevelopment")
export class ProfileDevelopment extends EntityBase {
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง Profile",
default: null,
})
profileId: string;
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง ProfileEmployee",
default: null,
})
profileEmployeeId: string;
@Column({
nullable: true,
comment: "ชื่อเรื่อง",
default: null,
})
name: string;
@Column({
nullable: true,
comment: "เป้าหมาย",
default: null,
})
target: string;
@Column({
type: "double",
nullable: true,
default: null,
comment: "ผลการประเมิน",
})
summary: number;
@Column({
nullable: true,
comment: "ระดับคะแนน",
default: null,
})
point: number;
@Column({
nullable: true,
comment: "เกณฑ์การประเมิน 10",
default: null,
})
achievement10: string;
@Column({
nullable: true,
comment: "เกณฑ์การประเมิน 5",
default: null,
})
achievement5: string;
@Column({
nullable: true,
comment: "เกณฑ์การประเมิน 0",
default: null,
})
achievement0: string;
@Column({
comment: "วิธีพัฒนา70",
default: false,
})
isDevelopment70: boolean;
@Column({
comment: "วิธีพัฒนา20",
default: false,
})
isDevelopment20: boolean;
@Column({
comment: "วิธีพัฒนา10",
default: false,
})
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.profileDevelopment,
)
developmentProjects: DevelopmentProject[];
@OneToMany(() => ProfileDevelopmentHistory, (profileDevelopmentHistory) => profileDevelopmentHistory.histories)
profileDevelopmentHistories: ProfileDevelopmentHistory[];
@ManyToOne(() => Profile, (profile) => profile.profileDevelopments)
@JoinColumn({ name: "profileId" })
profile: Profile;
@ManyToOne(() => ProfileEmployee, (ProfileEmployee) => ProfileEmployee.profileDevelopments)
@JoinColumn({ name: "profileEmployeeId" })
profileEmployee: ProfileEmployee;
}
export class CreateProfileDevelopment {
profileId: string | null;
name: string;
target: string | null;
achievement10?: string | null;
achievement5?: string | null;
achievement0?: string | null;
developmentProjects?: string[];
reasonDevelopment70?: string;
reasonDevelopment20?: string;
reasonDevelopment10?: string;
isDevelopment70: boolean;
isDevelopment20: boolean;
isDevelopment10: boolean;
summary?: number;
point?: number;
}
export class CreateProfileEmployeeDevelopment {
profileEmployeeId: string | null;
name: string;
target: string | null;
achievement10?: string | null;
achievement5?: string | null;
achievement0?: string | null;
developmentProjects?: string[];
reasonDevelopment70?: string;
reasonDevelopment20?: string;
reasonDevelopment10?: string;
isDevelopment70: boolean;
isDevelopment20: boolean;
isDevelopment10: boolean;
summary?: number;
point?: number;
}
export type UpdateProfileDevelopment = {
name: string;
target: string | null;
achievement10?: string | null;
achievement5?: string | null;
achievement0?: string | null;
developmentProjects?: string[];
reasonDevelopment70?: string;
reasonDevelopment20?: string;
reasonDevelopment10?: string;
isDevelopment70: boolean;
isDevelopment20: boolean;
isDevelopment10: boolean;
summary?: number;
point?: number;
};

View file

@ -0,0 +1,114 @@
import { Entity, Column, ManyToOne, JoinColumn, OneToMany } from "typeorm";
import { EntityBase } from "./base/Base";
import { ProfileDevelopment } from "./ProfileDevelopment";
import { DevelopmentProject } from "./developmentProject";
@Entity("profileDevelopmentHistory")
export class ProfileDevelopmentHistory extends EntityBase {
@Column({
nullable: true,
comment: "ชื่อเรื่อง",
default: null,
})
name: string;
@Column({
nullable: true,
comment: "เป้าหมาย",
default: null,
})
target: string;
@Column({
type: "double",
nullable: true,
default: null,
comment: "ผลการประเมิน",
})
summary: number;
@Column({
nullable: true,
comment: "ระดับคะแนน",
default: null,
})
point: number;
@Column({
nullable: true,
comment: "เกณฑ์การประเมิน 10",
default: null,
})
achievement10: string;
@Column({
nullable: true,
comment: "เกณฑ์การประเมิน 5",
default: null,
})
achievement5: string;
@Column({
nullable: true,
comment: "เกณฑ์การประเมิน 0",
default: null,
})
achievement0: string;
@Column({
comment: "วิธีพัฒนา70",
default: false,
})
isDevelopment70: boolean;
@Column({
comment: "วิธีพัฒนา20",
default: false,
})
isDevelopment20: boolean;
@Column({
comment: "วิธีพัฒนา10",
default: false,
})
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,
(developmentHistoryProject: DevelopmentProject) => developmentHistoryProject.profileDevelopmentHistory,
)
developmentHistoryProjects: DevelopmentProject[];
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง Profile",
default: null,
})
profileDevelopmentId: string;
@ManyToOne(() => ProfileDevelopment, (profileDevelopment) => profileDevelopment.profileDevelopmentHistories)
@JoinColumn({ name: "profileDevelopmentId" })
histories: ProfileDevelopment;
}

View file

@ -31,6 +31,7 @@ import { SubDistrict } from "./SubDistrict";
import { ProfileEmployeeInformationHistory } from "./ProfileEmployeeInformationHistory";
import { ProfileEmployeeEmployment } from "./ProfileEmployeeEmployment";
import { ProfileEdit } from "./ProfileEdit";
import { ProfileDevelopment } from "./ProfileDevelopment";
@Entity("profileEmployee")
export class ProfileEmployee extends EntityBase {
@ -626,6 +627,9 @@ export class ProfileEmployee extends EntityBase {
@OneToMany(() => ProfileOther, (v) => v.profileEmployee)
profileOthers: ProfileOther[];
@OneToMany(() => ProfileDevelopment, (v) => v.profileEmployee)
profileDevelopments: ProfileDevelopment[];
@OneToMany(() => ProfileAvatar, (v) => v.profileEmployee)
profileAvatars: ProfileAvatar[];

View file

@ -0,0 +1,56 @@
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { ProfileDevelopment } from "./ProfileDevelopment";
import { ProfileDevelopmentHistory } from "./ProfileDevelopmentHistory";
@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,
})
profileDevelopmentId: string;
@ManyToOne(
() => ProfileDevelopment,
(profileDevelopment: ProfileDevelopment) => profileDevelopment.developmentProjects,
)
@JoinColumn({ name: "profileDevelopmentId" })
profileDevelopment: ProfileDevelopment;
@Column({
nullable: true,
comment: "โครงการ/หลักสูตรการฝึกอบรม",
default: null,
})
profileDevelopmentHistoryId: string;
@ManyToOne(
() => ProfileDevelopmentHistory,
(profileDevelopmentHistory: ProfileDevelopmentHistory) => profileDevelopmentHistory.developmentHistoryProjects,
)
@JoinColumn({ name: "profileDevelopmentHistoryId" })
profileDevelopmentHistory: ProfileDevelopmentHistory;
}
export class CreateDevelopmentProject {
@Column()
name: string;
}