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-13 20:47:28 +07:00
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
comment: "id หน่วยงาน",
|
|
|
|
|
default: null,
|
|
|
|
|
})
|
|
|
|
|
rootId: string;
|
|
|
|
|
|
|
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
comment: "ชื่อหน่วยงาน",
|
|
|
|
|
default: null,
|
|
|
|
|
})
|
|
|
|
|
root: string;
|
|
|
|
|
|
2024-04-17 17:31:07 +07:00
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
comment: "ชื่อหน่วยงานที่สังกัด",
|
|
|
|
|
default: null,
|
|
|
|
|
})
|
|
|
|
|
org: string;
|
|
|
|
|
|
2024-04-13 20:47:28 +07:00
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
2024-04-16 07:50:17 +07:00
|
|
|
comment: "ชื่อย่อหน่วยงาน",
|
2024-04-13 20:47:28 +07:00
|
|
|
default: null,
|
|
|
|
|
})
|
|
|
|
|
orgRootShortName: string;
|
|
|
|
|
|
|
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
comment: "id revision",
|
|
|
|
|
default: null,
|
|
|
|
|
})
|
|
|
|
|
orgRevisionId: string;
|
|
|
|
|
|
2024-04-16 07:50:17 +07:00
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
comment: "id profile",
|
|
|
|
|
length: 40,
|
|
|
|
|
default: null,
|
|
|
|
|
})
|
|
|
|
|
profileId: string;
|
|
|
|
|
|
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;
|
|
|
|
|
|
2024-04-16 07:50:17 +07:00
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
comment: "จำนวนวันที่อบรม",
|
|
|
|
|
default: null,
|
|
|
|
|
length: 255,
|
|
|
|
|
})
|
|
|
|
|
trainingDays: string;
|
|
|
|
|
|
2024-04-03 00:55:40 +07:00
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
comment: "เลขที่คำสั่ง/เลขที่หนังสืออนุมัติ",
|
|
|
|
|
default: null,
|
|
|
|
|
length: 255,
|
|
|
|
|
})
|
|
|
|
|
order: string;
|
|
|
|
|
|
2024-04-17 15:01:33 +07:00
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
type: "datetime",
|
|
|
|
|
comment: "วันที่เริ่มต้น",
|
|
|
|
|
default: null,
|
|
|
|
|
})
|
|
|
|
|
dateStart: Date;
|
|
|
|
|
|
|
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
type: "datetime",
|
|
|
|
|
comment: "วันที่สิ้นสุด",
|
|
|
|
|
default: null,
|
|
|
|
|
})
|
|
|
|
|
dateEnd: Date;
|
|
|
|
|
|
2024-04-03 00:55:40 +07:00
|
|
|
@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-13 20:47:28 +07:00
|
|
|
|
|
|
|
|
@Column({
|
|
|
|
|
comment: "บันทึกลงทะเบียนประวัติ",
|
|
|
|
|
default: false,
|
|
|
|
|
})
|
|
|
|
|
isDone: boolean;
|
2024-07-30 11:33:46 +07:00
|
|
|
|
2024-10-01 00:41:09 +07:00
|
|
|
@Column({
|
|
|
|
|
comment: "บันทึก IDP ที่ทะเบียนประวัติ",
|
|
|
|
|
default: false,
|
|
|
|
|
})
|
|
|
|
|
isDoneIDP: boolean;
|
|
|
|
|
|
2024-07-30 11:33:46 +07:00
|
|
|
@Column({
|
|
|
|
|
comment: "มีข้อมูลอยู่ในทะเบียนประวัติ",
|
|
|
|
|
default: false,
|
|
|
|
|
})
|
|
|
|
|
isProfile: boolean;
|
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-17 15:01:33 +07:00
|
|
|
@Column()
|
|
|
|
|
dateStart: Date | null;
|
|
|
|
|
@Column()
|
|
|
|
|
dateEnd: 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-17 15:01:33 +07:00
|
|
|
@Column()
|
|
|
|
|
dateStart: Date | null;
|
|
|
|
|
@Column()
|
|
|
|
|
dateEnd: Date | null;
|
2024-04-03 00:55:40 +07:00
|
|
|
}
|
2024-07-30 16:49:16 +07:00
|
|
|
|
|
|
|
|
export class CreateDevelopmentHistoryOBO {
|
2024-07-30 17:23:45 +07:00
|
|
|
// @Column()
|
|
|
|
|
// rank: string | null;
|
2024-07-30 16:49:16 +07:00
|
|
|
@Column()
|
|
|
|
|
prefix: string | null;
|
|
|
|
|
@Column()
|
|
|
|
|
firstName: string | null;
|
|
|
|
|
@Column()
|
|
|
|
|
lastName: string | null;
|
|
|
|
|
@Column()
|
|
|
|
|
citizenId: string;
|
|
|
|
|
@Column()
|
|
|
|
|
position: string | null;
|
|
|
|
|
@Column()
|
2024-07-30 17:23:45 +07:00
|
|
|
posExecutive?: string | null;
|
2024-07-30 16:49:16 +07:00
|
|
|
@Column()
|
2024-07-30 17:23:45 +07:00
|
|
|
posLevelId?: string | null;
|
2024-07-30 16:49:16 +07:00
|
|
|
@Column()
|
2024-07-30 17:23:45 +07:00
|
|
|
posTypeId?: string | null;
|
|
|
|
|
// @Column()
|
|
|
|
|
// developmentId: string;
|
2024-07-30 16:49:16 +07:00
|
|
|
@Column()
|
2024-07-30 17:23:45 +07:00
|
|
|
commandNumber: string | null;
|
2024-07-30 16:49:16 +07:00
|
|
|
@Column()
|
2024-07-30 17:23:45 +07:00
|
|
|
commandDate: Date | null;
|
2024-07-30 16:49:16 +07:00
|
|
|
@Column()
|
|
|
|
|
trainingDays: string | null;
|
|
|
|
|
@Column()
|
|
|
|
|
org: string | null;
|
|
|
|
|
@Column()
|
|
|
|
|
type: string | null;
|
|
|
|
|
@Column()
|
|
|
|
|
dateStart: Date | null;
|
|
|
|
|
@Column()
|
|
|
|
|
dateEnd: Date | null;
|
|
|
|
|
}
|