เพิ่มเครื่องราชฯ เพิ่มหน้ากรองลูกจ้างประจำก่อนประมวลผล

This commit is contained in:
kittapath 2025-01-25 01:19:18 +07:00
parent a462f2bddd
commit c60beef7e3
13 changed files with 1745 additions and 1 deletions

View file

@ -45,6 +45,8 @@ import { StateOperatorUser } from "./StateOperatorUser";
import { StateUserComment } from "./StateUserComment";
import { CommandSign } from "./CommandSign";
import { RoleKeycloak } from "./RoleKeycloak";
import { ProfileActposition } from "./ProfileActposition";
import { ProfileAssistance } from "./ProfileAssistance";
@Entity("profile")
export class Profile extends EntityBase {
@ -393,6 +395,12 @@ export class Profile extends EntityBase {
@OneToMany(() => ProfileAssessment, (profileAssessment) => profileAssessment.profile)
profileAssessments: ProfileAssessment[];
@OneToMany(() => ProfileActposition, (profileActposition) => profileActposition.profile)
profileActpositions: ProfileActposition[];
@OneToMany(() => ProfileAssistance, (profileAssistance) => profileAssistance.profile)
profileAssistances: ProfileAssistance[];
@OneToMany(() => ProfileLeave, (profileLeave) => profileLeave.profile)
profileLeaves: ProfileLeave[];

View file

@ -0,0 +1,101 @@
import { Entity, Column, ManyToOne, JoinColumn, OneToMany } from "typeorm";
import { EntityBase } from "./base/Base";
import { Profile } from "./Profile";
import { ProfileActpositionHistory } from "./ProfileActpositionHistory";
import { ProfileEmployee } from "./ProfileEmployee";
@Entity("profileActposition")
export class ProfileActposition extends EntityBase {
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง Profile",
default: null,
})
profileId: 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,
})
posNo: string;
@Column({
nullable: true,
comment: "ตำแหน่ง",
default: null,
})
position: string;
@Column({
nullable: true,
comment: "สถานะ",
default: null,
})
status: string;
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง ProfileEmployee",
default: null,
})
profileEmployeeId: string;
@OneToMany(
() => ProfileActpositionHistory,
(profileActpositionHistory) => profileActpositionHistory.histories,
)
profileActpositionHistorys: ProfileActpositionHistory[];
@ManyToOne(() => Profile, (profile) => profile.profileAbilities)
@JoinColumn({ name: "profileId" })
profile: Profile;
@ManyToOne(() => ProfileEmployee, (ProfileEmployee) => ProfileEmployee.profileAbilities)
@JoinColumn({ name: "profileEmployeeId" })
profileEmployee: ProfileEmployee;
}
export class CreateProfileActposition {
profileId: string | null;
dateStart: Date | null;
dateEnd: Date | null;
posNo: string | null;
position: string | null;
status: string | null;
}
export class CreateProfileActpositionEmployee {
profileEmployeeId: string | null;
dateStart: Date | null;
dateEnd: Date | null;
posNo: string | null;
position: string | null;
status: string | null;
}
export type UpdateProfileActposition = {
dateStart?: Date | null;
dateEnd?: Date | null;
posNo?: string | null;
position?: string | null;
status?: string | null;
};

View file

@ -0,0 +1,58 @@
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { ProfileActposition } from "./ProfileActposition";
@Entity("profileActpositionHistory")
export class ProfileActpositionHistory extends EntityBase {
@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,
})
posNo: string;
@Column({
nullable: true,
comment: "ตำแหน่ง",
default: null,
})
position: string;
@Column({
nullable: true,
comment: "สถานะ",
default: null,
})
status: string;
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง ProfileActposition",
default: null,
})
profileActpositionId: string;
@ManyToOne(
() => ProfileActposition,
(profileActposition) => profileActposition.profileActpositionHistorys,
)
@JoinColumn({ name: "profileActpositionId" })
histories: ProfileActposition;
}

View 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;
};

View file

@ -0,0 +1,64 @@
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;
@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;
@ManyToOne(
() => ProfileAssistance,
(profileAssistance) => profileAssistance.profileAssistanceHistorys,
)
@JoinColumn({ name: "profileAssistanceId" })
histories: ProfileAssistance;
}