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

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

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