เพิ่มเครื่องราชฯ เพิ่มหน้ากรองลูกจ้างประจำก่อนประมวลผล
This commit is contained in:
parent
a462f2bddd
commit
c60beef7e3
13 changed files with 1745 additions and 1 deletions
110
src/entities/ProfileAssistance.ts
Normal file
110
src/entities/ProfileAssistance.ts
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn, OneToMany } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { Profile } from "./Profile";
|
||||
import { ProfileAssistanceHistory } from "./ProfileAssistanceHistory";
|
||||
import { ProfileEmployee } from "./ProfileEmployee";
|
||||
|
||||
@Entity("profileAssistance")
|
||||
export class ProfileAssistance extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง Profile",
|
||||
default: null,
|
||||
})
|
||||
profileId: string;
|
||||
|
||||
@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;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "เอกสารอ้างอิง",
|
||||
default: null,
|
||||
})
|
||||
document: string;
|
||||
|
||||
@Column({
|
||||
comment: "แนบไฟล์เอกสาร",
|
||||
default: false,
|
||||
})
|
||||
isUpload: boolean;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง ProfileEmployee",
|
||||
default: null,
|
||||
})
|
||||
profileEmployeeId: string;
|
||||
|
||||
@OneToMany(
|
||||
() => ProfileAssistanceHistory,
|
||||
(profileAssistanceHistory) => profileAssistanceHistory.histories,
|
||||
)
|
||||
profileAssistanceHistorys: ProfileAssistanceHistory[];
|
||||
|
||||
@ManyToOne(() => Profile, (profile) => profile.profileAbilities)
|
||||
@JoinColumn({ name: "profileId" })
|
||||
profile: Profile;
|
||||
|
||||
@ManyToOne(() => ProfileEmployee, (ProfileEmployee) => ProfileEmployee.profileAbilities)
|
||||
@JoinColumn({ name: "profileEmployeeId" })
|
||||
profileEmployee: ProfileEmployee;
|
||||
}
|
||||
|
||||
export class CreateProfileAssistance {
|
||||
profileId: string | null;
|
||||
agency: string | null;
|
||||
dateStart: Date | null;
|
||||
dateEnd: Date | null;
|
||||
commandNo: string | null;
|
||||
document: string | null;
|
||||
isUpload: boolean;
|
||||
}
|
||||
|
||||
export class CreateProfileAssistanceEmployee {
|
||||
profileEmployeeId: string | null;
|
||||
agency: string | null;
|
||||
dateStart: Date | null;
|
||||
dateEnd: Date | null;
|
||||
commandNo: string | null;
|
||||
document: string | null;
|
||||
isUpload: boolean;
|
||||
}
|
||||
|
||||
export type UpdateProfileAssistance = {
|
||||
agency?: string | null;
|
||||
dateStart?: Date | null;
|
||||
dateEnd?: Date | null;
|
||||
commandNo?: string | null;
|
||||
document?: string | null;
|
||||
isUpload: boolean;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue