crud emp myinfo
This commit is contained in:
parent
2d582be2a1
commit
ac82b6351f
10 changed files with 1050 additions and 2 deletions
|
|
@ -16,7 +16,7 @@ import { ProfileAbility } from "./ProfileAbility";
|
|||
import { ProfileDuty } from "./ProfileDuty";
|
||||
import { ProfileNopaid } from "./ProfileNopaid";
|
||||
import { ProfileOther } from "./ProfileOther";
|
||||
import { ProfileFamilyHistory } from "./ProfileFamily";
|
||||
import { ProfileChildren, ProfileFamilyHistory } from "./ProfileFamily";
|
||||
import { ProfileGovernment } from "./ProfileGovernment";
|
||||
import { Province } from "./Province";
|
||||
import { SubDistrict } from "./SubDistrict";
|
||||
|
|
@ -297,6 +297,9 @@ export class Profile extends EntityBase {
|
|||
@OneToMany(() => ProfileFamilyHistory, (profileFamily) => profileFamily.profile)
|
||||
profileFamily: ProfileFamilyHistory[];
|
||||
|
||||
@OneToMany(() => ProfileChildren, (profileChildren) => profileChildren.profile)
|
||||
profileChildren: ProfileChildren[];
|
||||
|
||||
@OneToMany(() => ProfileGovernment, (profileGovernment) => profileGovernment.profile)
|
||||
profileGovernment: ProfileGovernment[];
|
||||
|
||||
|
|
|
|||
|
|
@ -95,6 +95,16 @@ export class CreateProfileAbility {
|
|||
field: string | null;
|
||||
}
|
||||
|
||||
export class CreateProfileAbilityEmployee {
|
||||
profileEmployeeId: string | null;
|
||||
remark: string | null;
|
||||
detail: string | null;
|
||||
reference: string | null;
|
||||
dateStart: Date | null;
|
||||
dateEnd: Date | null;
|
||||
field: string | null;
|
||||
}
|
||||
|
||||
export type UpdateProfileAbility = {
|
||||
remark?: string | null;
|
||||
detail?: string | null;
|
||||
|
|
|
|||
|
|
@ -92,6 +92,16 @@ export class CreateProfileChangeName {
|
|||
documentId: string | null;
|
||||
}
|
||||
|
||||
export class CreateProfileChangeNameEmployee {
|
||||
profileEmployeeId: string | null;
|
||||
prefixId: string | null;
|
||||
prefix: string | null;
|
||||
firstName: string | null;
|
||||
lastName: string | null;
|
||||
status: string | null;
|
||||
documentId: string | null;
|
||||
}
|
||||
|
||||
export type UpdateProfileChangeName = {
|
||||
prefixId?: string | null;
|
||||
prefix?: string | null;
|
||||
|
|
|
|||
|
|
@ -206,6 +206,29 @@ export class CreateProfileEducation {
|
|||
note: string | null;
|
||||
}
|
||||
|
||||
export class CreateProfileEducationEmployee {
|
||||
profileEmployeeId: string | null;
|
||||
country: string | null;
|
||||
degree: string | null;
|
||||
duration: string | null;
|
||||
durationYear: number;
|
||||
field: string | null;
|
||||
finishDate: Date | null;
|
||||
fundName: string | null;
|
||||
gpa: string | null;
|
||||
institute: string | null;
|
||||
other: string | null;
|
||||
startDate: Date | null;
|
||||
endDate: Date | null;
|
||||
educationLevel: string | null;
|
||||
educationLevelId: string | null;
|
||||
positionPath: string | null;
|
||||
positionPathId: string | null;
|
||||
isDate: boolean | null;
|
||||
isEducation: boolean | null;
|
||||
note: string | null;
|
||||
}
|
||||
|
||||
export type UpdateProfileEducation = {
|
||||
country?: string | null;
|
||||
degree?: string | null;
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import { ProfileDuty } from "./ProfileDuty";
|
|||
import { ProfileNopaid } from "./ProfileNopaid";
|
||||
import { ProfileDiscipline } from "./ProfileDiscipline";
|
||||
import { ProfileChangeName } from "./ProfileChangeName";
|
||||
import { ProfileFamilyHistory } from "./ProfileFamily";
|
||||
import { ProfileChildren, ProfileFamilyHistory } from "./ProfileFamily";
|
||||
import { ProfileEducation } from "./ProfileEducation";
|
||||
import { ProfileAbility } from "./ProfileAbility";
|
||||
@Entity("profileEmployee")
|
||||
|
|
@ -242,6 +242,9 @@ export class ProfileEmployee extends EntityBase {
|
|||
@OneToMany(() => ProfileFamilyHistory, (v) => v.profileEmployee)
|
||||
profileFamilys: ProfileFamilyHistory[];
|
||||
|
||||
@OneToMany(() => ProfileChildren, (v) => v.profileEmployee)
|
||||
profileChildrens: ProfileChildren[];
|
||||
|
||||
@OneToMany(() => ProfileEducation, (v) => v.profileEmployee)
|
||||
profileEducations: ProfileEducation[];
|
||||
|
||||
|
|
|
|||
|
|
@ -229,11 +229,23 @@ export class ProfileChildren extends EntityBase {
|
|||
})
|
||||
profileId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง ProfileEmployee",
|
||||
default: null,
|
||||
})
|
||||
profileEmployeeId: string;
|
||||
|
||||
@ManyToOne(() => Profile, (v) => v.profileFamily, { onDelete: "CASCADE" })
|
||||
profile: Profile;
|
||||
|
||||
@OneToMany(() => ProfileChildrenHistory, (v) => v.profileChildren)
|
||||
histories: Profile;
|
||||
|
||||
@ManyToOne(() => ProfileEmployee, (ProfileEmployee) => ProfileEmployee.profileChildrens)
|
||||
@JoinColumn({ name: "profileEmployeeId" })
|
||||
profileEmployee: ProfileEmployee;
|
||||
}
|
||||
|
||||
@Entity("profileChildrenHistory")
|
||||
|
|
@ -306,6 +318,30 @@ export type CreateProfileFamily = {
|
|||
profileId: string;
|
||||
children: CreateChildren[];
|
||||
};
|
||||
export type CreateProfileFamilyEmployee = {
|
||||
couple: boolean | null;
|
||||
couplePrefix: string | null;
|
||||
coupleFirstName: string | null;
|
||||
coupleLastName: string | null;
|
||||
coupleLastNameOld: string | null;
|
||||
coupleCareer: string | null;
|
||||
coupleCitizenId: string | null;
|
||||
coupleLive: boolean | null;
|
||||
fatherPrefix: string | null;
|
||||
fatherFirstName: string | null;
|
||||
fatherLastName: string | null;
|
||||
fatherCareer: string | null;
|
||||
fatherCitizenId: string | null;
|
||||
fatherLive: boolean | null;
|
||||
motherPrefix: string | null;
|
||||
motherFirstName: string | null;
|
||||
motherLastName: string | null;
|
||||
motherCareer: string | null;
|
||||
motherCitizenId: string | null;
|
||||
motherLive: boolean | null;
|
||||
profileEmployeeId: string | null;
|
||||
children: CreateChildren[];
|
||||
};
|
||||
|
||||
export type UpdateProfileFamily = {
|
||||
couple?: boolean | null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue