feat: profile gov entities
This commit is contained in:
parent
21699284db
commit
232211bcee
2 changed files with 229 additions and 0 deletions
|
|
@ -18,6 +18,7 @@ import { ProfileNopaid } from "./ProfileNopaid";
|
||||||
import { ProfileOther } from "./ProfileOther";
|
import { ProfileOther } from "./ProfileOther";
|
||||||
import { ProfileInformation } from "./ProfileInformation";
|
import { ProfileInformation } from "./ProfileInformation";
|
||||||
import { ProfileFamilyHistory } from "./ProfileFamily";
|
import { ProfileFamilyHistory } from "./ProfileFamily";
|
||||||
|
import { ProfileGovernment } from "./ProfileGovernment";
|
||||||
|
|
||||||
@Entity("profile")
|
@Entity("profile")
|
||||||
export class Profile extends EntityBase {
|
export class Profile extends EntityBase {
|
||||||
|
|
@ -186,6 +187,9 @@ export class Profile extends EntityBase {
|
||||||
@OneToMany(() => ProfileFamilyHistory, (profileFamily) => profileFamily.profile)
|
@OneToMany(() => ProfileFamilyHistory, (profileFamily) => profileFamily.profile)
|
||||||
profileFamily: ProfileFamilyHistory[];
|
profileFamily: ProfileFamilyHistory[];
|
||||||
|
|
||||||
|
@OneToMany(() => ProfileGovernment, (profileGovernment) => profileGovernment.profile)
|
||||||
|
profileGovernment: ProfileGovernment[];
|
||||||
|
|
||||||
@ManyToOne(() => PosLevel, (posLevel) => posLevel.profiles)
|
@ManyToOne(() => PosLevel, (posLevel) => posLevel.profiles)
|
||||||
@JoinColumn({ name: "posLevelId" })
|
@JoinColumn({ name: "posLevelId" })
|
||||||
posLevel: PosLevel;
|
posLevel: PosLevel;
|
||||||
|
|
|
||||||
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