add tables
This commit is contained in:
parent
277bd39510
commit
a46c942e1c
4 changed files with 158 additions and 2 deletions
|
|
@ -23,7 +23,7 @@ import { ProfileGovernment } from "./ProfileGovernment";
|
||||||
import { ProfileFamilyFather } from "./ProfileFamilyFather";
|
import { ProfileFamilyFather } from "./ProfileFamilyFather";
|
||||||
import { ProfileFamilyMother } from "./ProfileFamilyMother";
|
import { ProfileFamilyMother } from "./ProfileFamilyMother";
|
||||||
import { ProfileFamilyCouple } from "./ProfileFamilyCouple";
|
import { ProfileFamilyCouple } from "./ProfileFamilyCouple";
|
||||||
|
import { ProfileEmployeeInformationHistory } from "./ProfileEmployeeInformationHistory"
|
||||||
import { ProfileChildren } from "./ProfileChildren";
|
import { ProfileChildren } from "./ProfileChildren";
|
||||||
import { Profile, ProfileAddressHistory } from "./Profile";
|
import { Profile, ProfileAddressHistory } from "./Profile";
|
||||||
import { Province } from "./Province";
|
import { Province } from "./Province";
|
||||||
|
|
@ -563,6 +563,9 @@ export class ProfileEmployee extends EntityBase {
|
||||||
})
|
})
|
||||||
employeeMoneyEmployer: string;
|
employeeMoneyEmployer: string;
|
||||||
|
|
||||||
|
@OneToMany(() => ProfileEmployeeInformationHistory, (v) => v.profileEmployeeInformation)
|
||||||
|
information_histories: ProfileEmployeeInformationHistory[];
|
||||||
|
|
||||||
@OneToMany(() => EmployeePosMaster, (v) => v.current_holder)
|
@OneToMany(() => EmployeePosMaster, (v) => v.current_holder)
|
||||||
current_holders: EmployeePosMaster[];
|
current_holders: EmployeePosMaster[];
|
||||||
|
|
||||||
|
|
@ -779,7 +782,7 @@ export class CreateProfileEmployee {
|
||||||
employeeClass?: string | null;
|
employeeClass?: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class CreateInformationProfileEmployeeTemp {
|
export class CreateInformationProfileEmployee {
|
||||||
positionEmployeeGroupId?: string | null;
|
positionEmployeeGroupId?: string | null;
|
||||||
positionEmployeeLineId?: string | null;
|
positionEmployeeLineId?: string | null;
|
||||||
positionEmployeePositionId?: string | null;
|
positionEmployeePositionId?: string | null;
|
||||||
|
|
|
||||||
30
src/entities/ProfileEmployeeEmployment.ts
Normal file
30
src/entities/ProfileEmployeeEmployment.ts
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
import { Entity, Column, OneToMany, ManyToOne } from "typeorm";
|
||||||
|
import { EntityBase } from "./base/Base";
|
||||||
|
import { ProfileEmployeeEmploymentHistory } from "./ProfileEmployeeEmploymentHistory"
|
||||||
|
|
||||||
|
@Entity("profileEmployeeEmployment")
|
||||||
|
export class ProfileEmployeeEmployment extends EntityBase {
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
type: "datetime",
|
||||||
|
comment: "วันที่จ้าง",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
date: Date;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "คำสั่งจ้าง",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
command: string;
|
||||||
|
|
||||||
|
@OneToMany(() => ProfileEmployeeEmploymentHistory, (v) => v.profileEmployeeEmployment)
|
||||||
|
histories: ProfileEmployeeEmploymentHistory[];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export class CreateEmploymentProfileEmployee {
|
||||||
|
date: Date | null;
|
||||||
|
command: string | null;
|
||||||
|
}
|
||||||
34
src/entities/ProfileEmployeeEmploymentHistory.ts
Normal file
34
src/entities/ProfileEmployeeEmploymentHistory.ts
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
|
||||||
|
import { EntityBase } from "./base/Base";
|
||||||
|
import { ProfileEmployeeEmployment } from "./ProfileEmployeeEmployment"
|
||||||
|
|
||||||
|
@Entity("profileEmployeeEmploymentHistory")
|
||||||
|
export class ProfileEmployeeEmploymentHistory extends EntityBase {
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
type: "datetime",
|
||||||
|
comment: "วันที่จ้าง",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
date: Date;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "คำสั่งจ้าง",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
command: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
length: 40,
|
||||||
|
comment: "คีย์นอก(FK)ของตาราง ProfileEmployeeEmployment",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
profileEmployeeEmploymentId: string;
|
||||||
|
|
||||||
|
@ManyToOne(() => ProfileEmployeeEmployment, (v) => v.histories)
|
||||||
|
@JoinColumn({ name: "profileEmployeeEmploymentId" })
|
||||||
|
profileEmployeeEmployment: ProfileEmployeeEmployment;
|
||||||
|
|
||||||
|
}
|
||||||
89
src/entities/ProfileEmployeeInformationHistory.ts
Normal file
89
src/entities/ProfileEmployeeInformationHistory.ts
Normal file
|
|
@ -0,0 +1,89 @@
|
||||||
|
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
|
||||||
|
import { EntityBase } from "./base/Base";
|
||||||
|
import { ProfileEmployee } from "./ProfileEmployee";
|
||||||
|
|
||||||
|
@Entity("profileEmployeeInformationHistory")
|
||||||
|
export class ProfileEmployeeInformationHistory extends EntityBase {
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "กลุ่มงาน",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
positionEmployeeGroupId: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "สายงาน",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
positionEmployeeLineId: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "ชื่อตำแหน่งทางสายงาน",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
positionEmployeePositionId: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "สังกัด",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
employeeOc: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "ประเภทบุคคล",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
employeeTypeIndividual: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "ค่าจ้าง",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
employeeWage: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "เงินเพิ่มการครองชีพชั่วคราว",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
employeeMoneyIncrease: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "เงินช่วยเหลือการครองชีพชั่วคราว",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
employeeMoneyAllowance: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "เงินสมทบประกันสังคม(ลูกจ้าง)",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
employeeMoneyEmployee: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "เงินสมทบประกันสังคม(นายจ้าง)",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
employeeMoneyEmployer: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
length: 40,
|
||||||
|
comment: "คีย์นอก(FK)ของตาราง ProfileEmployee",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
profileEmployeeId: string;
|
||||||
|
|
||||||
|
@ManyToOne(() => ProfileEmployee, (profileEmp) => profileEmp.information_histories)
|
||||||
|
@JoinColumn({ name: "profileEmployeeId" })
|
||||||
|
profileEmployeeInformation: ProfileEmployee;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue