crud emp myinfo

This commit is contained in:
AdisakKanthawilang 2024-05-14 10:29:05 +07:00
parent 2d582be2a1
commit ac82b6351f
10 changed files with 1050 additions and 2 deletions

View file

@ -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;