hrms-api-org/src/entities/ProfileGovernment.ts

218 lines
4.7 KiB
TypeScript
Raw Normal View History

2024-03-20 16:16:44 +07:00
import { Column, Entity, ManyToOne } from "typeorm";
import { EntityBase } from "./base/Base";
import { Profile } from "./Profile";
@Entity("profileGovernment")
export class ProfileGovernment extends EntityBase {
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง Profile",
default: null,
})
profileId: string;
@ManyToOne(() => Profile, (v) => v.profileGovernment)
profile: Profile;
@Column({
nullable: true,
length: 40,
default: null,
comment: "เลขที่ตำแหน่ง",
})
posNoId: string;
@Column({
nullable: true,
length: 40,
default: null,
comment: "สังกัด",
})
ocId: string;
@Column({
nullable: true,
length: 40,
default: null,
comment: "คีย์นอก(FK)ของตาราง Position",
})
positionId: string;
@Column({
nullable: true,
default: null,
comment: "วันที่สั่งบรรจุ",
})
dateAppoint: Date;
@Column({
nullable: true,
default: null,
comment: "เริ่มปฎิบัติราชการ",
})
dateStart: Date;
@Column({
nullable: true,
default: null,
comment: "วันเกษียณอายุ",
})
retireDate: Date;
@Column({
nullable: true,
default: null,
comment: "อายุราชการ",
})
govAge: string;
@Column({
nullable: true,
default: null,
comment: "ขาดราชการ",
})
govAgeAbsent: string;
@Column({
nullable: true,
default: null,
comment: "อายุราชการเกื้อกูล",
})
govAgePlus: string;
@Column({
nullable: true,
default: null,
comment: "สังกัด",
})
oc: string;
@Column({
nullable: true,
default: null,
comment: "เลขที่ตำแหน่ง",
})
posNo: string;
@Column({
nullable: true,
default: null,
comment: "ตำแหน่ง",
})
2024-03-20 17:31:11 +07:00
position: string;
2024-03-20 16:16:44 +07:00
@Column({
nullable: true,
default: null,
comment: "ระดับตำแหน่ง",
})
positionLevel: string;
@Column({
nullable: true,
default: null,
comment: "สายงาน",
})
positionLine: string;
@Column({
nullable: true,
default: null,
comment: "ประเภทตำแหน่ง",
})
positionType: string;
@Column({
nullable: true,
default: null,
comment: "ตำแหน่งทางการบริหาร",
})
positionExecutive: string;
@Column({
nullable: true,
default: null,
comment: "เหตุผลกรณีไม่ตรงวัน",
})
reasonSameDate: string;
@Column({
nullable: true,
default: null,
comment: "กลุ่มงาน",
})
positionEmployeeGroup: string;
@Column({
nullable: true,
default: null,
comment: "ระดับชั้นงาน",
})
positionEmployeeLevel: string;
@Column({
nullable: true,
default: null,
comment: "ตำแหน่ง",
})
positionEmployeePosition: string;
@Column({
nullable: true,
default: null,
comment: "ด้านของตำแหน่ง",
})
positionEmployeePositionSide: string;
}
export type CreateProfileGovernment = {
positionId: string | null;
profileId: string | null;
profile: Profile | null;
posNoId: string | null;
ocId: string | null;
dateAppoint: Date | null;
dateStart: Date | null;
retireDate: Date | null;
govAge: string | null;
govAgeAbsent: string | null;
govAgePlus: string | null;
oc: string | null;
posNo: string | null;
postition: string | null;
positionLevel: string | null;
positionLine: string | null;
positionType: string | null;
positionExecutive: string | null;
reasonSameDate: string | null;
positionEmployeeGroup: string | null;
positionEmployeeLevel: string | null;
positionEmployeePosition: string | null;
positionEmployeePositionSide: string | null;
};
export type UpdateProfileGovernment = {
positionId?: string | null;
profile?: Profile | null;
posNoId?: string | null;
ocId?: string | null;
dateAppoint?: Date | null;
dateStart?: Date | null;
retireDate?: Date | null;
govAge?: string | null;
govAgeAbsent?: string | null;
govAgePlus?: string | null;
oc?: string | null;
posNo?: string | null;
postition?: string | null;
positionLevel?: string | null;
positionLine?: string | null;
positionType?: string | null;
positionExecutive?: string | null;
reasonSameDate?: string | null;
positionEmployeeGroup?: string | null;
positionEmployeeLevel?: string | null;
positionEmployeePosition?: string | null;
positionEmployeePositionSide?: string | null;
};