2024-04-03 00:55:40 +07:00
|
|
|
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
|
|
|
|
|
import { EntityBase } from "./base/Base";
|
|
|
|
|
import { PosLevel } from "./PosLevel";
|
|
|
|
|
import { PosType } from "./PosType";
|
|
|
|
|
import { Development } from "./Development";
|
2024-04-03 12:07:57 +07:00
|
|
|
import { EmployeePosType } from "./EmployeePosType";
|
|
|
|
|
import { EmployeePosLevel } from "./EmployeePosLevel";
|
2024-04-03 00:55:40 +07:00
|
|
|
|
|
|
|
|
@Entity("developmentHistory")
|
|
|
|
|
export class DevelopmentHistory extends EntityBase {
|
2024-04-03 11:28:08 +07:00
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
comment: "ประเภทราชการ",
|
|
|
|
|
length: 40,
|
|
|
|
|
default: null,
|
|
|
|
|
})
|
|
|
|
|
type: string;
|
|
|
|
|
|
2024-04-03 00:55:40 +07:00
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
comment: "ยศ",
|
|
|
|
|
length: 40,
|
|
|
|
|
default: null,
|
|
|
|
|
})
|
|
|
|
|
rank: string;
|
|
|
|
|
|
|
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
comment: "คำนำหน้าชื่อ",
|
|
|
|
|
length: 40,
|
|
|
|
|
default: null,
|
|
|
|
|
})
|
|
|
|
|
prefix: string;
|
|
|
|
|
|
|
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
comment: "ชื่อ",
|
|
|
|
|
length: 255,
|
|
|
|
|
default: null,
|
|
|
|
|
})
|
|
|
|
|
firstName: string;
|
|
|
|
|
|
|
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
comment: "นามสกุล",
|
|
|
|
|
length: 255,
|
|
|
|
|
default: null,
|
|
|
|
|
})
|
|
|
|
|
lastName: string;
|
|
|
|
|
|
|
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
comment: "เลขประจำตัวประชาชน",
|
|
|
|
|
default: null,
|
|
|
|
|
length: 13,
|
|
|
|
|
})
|
|
|
|
|
citizenId: string;
|
|
|
|
|
|
|
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
comment: "ตำแหน่ง",
|
|
|
|
|
default: null,
|
|
|
|
|
length: 255,
|
|
|
|
|
})
|
|
|
|
|
position: string;
|
|
|
|
|
|
2024-04-03 13:36:59 +07:00
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
comment: "ชื่อตำแหน่งทางการบริหาร",
|
|
|
|
|
length: 255,
|
|
|
|
|
default: null,
|
|
|
|
|
})
|
|
|
|
|
posExecutive: string;
|
|
|
|
|
|
2024-04-03 00:55:40 +07:00
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
length: 40,
|
|
|
|
|
comment: "ไอดีระดับตำแหน่ง",
|
|
|
|
|
})
|
|
|
|
|
posLevelId: string | null;
|
|
|
|
|
|
|
|
|
|
@ManyToOne(() => PosLevel, (posLevel) => posLevel.developmentHistorys)
|
|
|
|
|
@JoinColumn({ name: "posLevelId" })
|
|
|
|
|
posLevel: PosLevel;
|
|
|
|
|
|
|
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
length: 40,
|
|
|
|
|
comment: "ไอดีประเภทตำแหน่ง",
|
|
|
|
|
})
|
|
|
|
|
posTypeId: string | null;
|
|
|
|
|
|
|
|
|
|
@ManyToOne(() => PosType, (posType) => posType.developmentHistorys)
|
|
|
|
|
@JoinColumn({ name: "posTypeId" })
|
|
|
|
|
posType: PosType;
|
|
|
|
|
|
2024-04-03 12:07:57 +07:00
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
length: 40,
|
|
|
|
|
comment: "ไอดีระดับตำแหน่ง",
|
|
|
|
|
})
|
|
|
|
|
employeePosLevelId: string | null;
|
|
|
|
|
|
|
|
|
|
@ManyToOne(() => EmployeePosLevel, (employeePosLevel) => employeePosLevel.developmentHistorys)
|
|
|
|
|
@JoinColumn({ name: "employeePosLevelId" })
|
|
|
|
|
employeePosLevel: EmployeePosLevel;
|
|
|
|
|
|
|
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
length: 40,
|
|
|
|
|
comment: "ไอดีประเภทตำแหน่ง",
|
|
|
|
|
})
|
|
|
|
|
employeePosTypeId: string | null;
|
|
|
|
|
|
|
|
|
|
@ManyToOne(() => EmployeePosType, (employeePosType) => employeePosType.developmentHistorys)
|
|
|
|
|
@JoinColumn({ name: "employeePosTypeId" })
|
|
|
|
|
employeePosType: EmployeePosType;
|
|
|
|
|
|
2024-04-03 00:55:40 +07:00
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
comment: "โครงการ/หลักสูตรการฝึกอบรม",
|
|
|
|
|
default: null,
|
|
|
|
|
})
|
|
|
|
|
developmentId: string;
|
|
|
|
|
|
|
|
|
|
@ManyToOne(() => Development, (development: Development) => development.developmentHistorys)
|
|
|
|
|
@JoinColumn({ name: "developmentId" })
|
|
|
|
|
development: Development;
|
|
|
|
|
|
|
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
comment: "เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ",
|
|
|
|
|
default: null,
|
|
|
|
|
length: 255,
|
|
|
|
|
})
|
|
|
|
|
order: string;
|
|
|
|
|
|
|
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
2024-04-03 16:14:00 +07:00
|
|
|
type: "datetime",
|
2024-04-03 00:55:40 +07:00
|
|
|
comment: "คำสั่งลงวันที่/หนังสืออนุมัติลงวันที่",
|
|
|
|
|
default: null,
|
|
|
|
|
})
|
2024-04-03 16:14:00 +07:00
|
|
|
dateOrder: Date;
|
2024-04-03 00:55:40 +07:00
|
|
|
}
|
|
|
|
|
export class CreateDevelopmentHistory {
|
|
|
|
|
@Column()
|
|
|
|
|
rank: string | null;
|
|
|
|
|
@Column()
|
|
|
|
|
prefix: string | null;
|
|
|
|
|
@Column()
|
|
|
|
|
firstName: string | null;
|
|
|
|
|
@Column()
|
|
|
|
|
lastName: string | null;
|
|
|
|
|
@Column()
|
|
|
|
|
citizenId: string;
|
|
|
|
|
@Column()
|
|
|
|
|
position: string | null;
|
|
|
|
|
@Column()
|
2024-04-03 13:36:59 +07:00
|
|
|
posExecutive: string | null;
|
|
|
|
|
@Column()
|
2024-04-03 00:55:40 +07:00
|
|
|
posLevelId: string | null;
|
|
|
|
|
@Column()
|
|
|
|
|
posTypeId: string | null;
|
|
|
|
|
@Column()
|
|
|
|
|
developmentId: string;
|
|
|
|
|
@Column()
|
|
|
|
|
order: string | null;
|
|
|
|
|
@Column()
|
2024-04-03 16:14:00 +07:00
|
|
|
dateOrder: Date | null;
|
2024-04-03 00:55:40 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export class UpdateDevelopmentHistory {
|
|
|
|
|
@Column()
|
|
|
|
|
rank: string | null;
|
|
|
|
|
@Column()
|
|
|
|
|
prefix: string | null;
|
|
|
|
|
@Column()
|
|
|
|
|
firstName: string | null;
|
|
|
|
|
@Column()
|
|
|
|
|
lastName: string | null;
|
|
|
|
|
@Column()
|
|
|
|
|
citizenId: string;
|
|
|
|
|
@Column()
|
|
|
|
|
position: string | null;
|
|
|
|
|
@Column()
|
2024-04-03 13:36:59 +07:00
|
|
|
posExecutive: string | null;
|
|
|
|
|
@Column()
|
2024-04-03 00:55:40 +07:00
|
|
|
posLevelId: string | null;
|
|
|
|
|
@Column()
|
|
|
|
|
posTypeId: string | null;
|
|
|
|
|
@Column()
|
|
|
|
|
developmentId: string;
|
|
|
|
|
@Column()
|
|
|
|
|
order: string | null;
|
|
|
|
|
@Column()
|
2024-04-03 16:14:00 +07:00
|
|
|
dateOrder: Date | null;
|
2024-04-03 00:55:40 +07:00
|
|
|
}
|