2025-01-25 01:19:18 +07:00
|
|
|
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
|
|
|
|
|
import { EntityBase } from "./base/Base";
|
|
|
|
|
import { ProfileAssistance } from "./ProfileAssistance";
|
|
|
|
|
|
|
|
|
|
@Entity("profileAssistanceHistory")
|
|
|
|
|
export class ProfileAssistanceHistory extends EntityBase {
|
|
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
comment: "หน่วยงานที่ให้ช่วยราชการ",
|
|
|
|
|
default: null,
|
|
|
|
|
})
|
|
|
|
|
agency: string;
|
|
|
|
|
|
|
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
type: "datetime",
|
|
|
|
|
comment: "วันเริ่มช่วยราชการ",
|
|
|
|
|
default: null,
|
|
|
|
|
})
|
|
|
|
|
dateStart: Date;
|
|
|
|
|
|
|
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
type: "datetime",
|
|
|
|
|
comment: "วันสิ้นสุดการช่วยราชการ",
|
|
|
|
|
default: null,
|
|
|
|
|
})
|
|
|
|
|
dateEnd: Date;
|
|
|
|
|
|
|
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
comment: "เลขที่คำสั่ง",
|
|
|
|
|
default: null,
|
|
|
|
|
})
|
|
|
|
|
commandNo: string;
|
|
|
|
|
|
2025-04-23 13:45:35 +07:00
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
comment: "ชื่อคำสั่ง",
|
|
|
|
|
default: null,
|
|
|
|
|
})
|
|
|
|
|
commandName: string;
|
|
|
|
|
|
2025-01-25 01:19:18 +07:00
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
comment: "เอกสารอ้างอิง",
|
|
|
|
|
default: null,
|
|
|
|
|
})
|
|
|
|
|
document: string;
|
|
|
|
|
|
|
|
|
|
@Column({
|
|
|
|
|
comment: "แนบไฟล์เอกสาร",
|
|
|
|
|
default: false,
|
|
|
|
|
})
|
|
|
|
|
isUpload: boolean;
|
|
|
|
|
|
|
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
length: 40,
|
|
|
|
|
comment: "คีย์นอก(FK)ของตาราง ProfileAssistance",
|
|
|
|
|
default: null,
|
|
|
|
|
})
|
|
|
|
|
profileAssistanceId: string;
|
|
|
|
|
|
2026-02-12 11:47:53 +07:00
|
|
|
@Column({
|
|
|
|
|
nullable: false,
|
|
|
|
|
comment: "สถานะลบข้อมูล",
|
|
|
|
|
default: false,
|
|
|
|
|
})
|
|
|
|
|
isDeleted: boolean;
|
|
|
|
|
|
2025-01-25 01:19:18 +07:00
|
|
|
@ManyToOne(
|
|
|
|
|
() => ProfileAssistance,
|
|
|
|
|
(profileAssistance) => profileAssistance.profileAssistanceHistorys,
|
|
|
|
|
)
|
|
|
|
|
@JoinColumn({ name: "profileAssistanceId" })
|
|
|
|
|
histories: ProfileAssistance;
|
|
|
|
|
}
|