feat: profile gov entities
This commit is contained in:
parent
21699284db
commit
232211bcee
2 changed files with 229 additions and 0 deletions
225
src/entities/ProfileGovernment.ts
Normal file
225
src/entities/ProfileGovernment.ts
Normal file
|
|
@ -0,0 +1,225 @@
|
|||
import { Column, Entity, ManyToOne } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { Profile } from "./Profile";
|
||||
|
||||
@Entity("profileGovernment")
|
||||
export class ProfileGovernment extends EntityBase {
|
||||
@Column({
|
||||
comment: "สถานะการใช้งาน",
|
||||
default: false,
|
||||
})
|
||||
isActive: boolean;
|
||||
|
||||
@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: "ตำแหน่ง",
|
||||
})
|
||||
postition: string;
|
||||
|
||||
@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 = {
|
||||
isActive: boolean | null;
|
||||
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 = {
|
||||
isActive?: boolean | null;
|
||||
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;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue