ปรับ children

This commit is contained in:
Bright 2024-05-15 18:02:16 +07:00
parent 1a017dcd76
commit 4fa11d2aea
5 changed files with 75 additions and 29 deletions

View file

@ -74,11 +74,14 @@ export class ProfileChildren extends EntityBase {
@JoinColumn({ name: "profileEmployeeId" })
profileEmployee: ProfileEmployee;
@OneToMany(
() => ProfileChildrenHistory,
(profileChildrenHistory) => profileChildrenHistory.histories,
)
profileChildrenHistories: ProfileChildrenHistory[];
// @OneToMany(
// () => ProfileChildrenHistory,
// (profileChildrenHistory) => profileChildrenHistory.histories,
// )
// profileChildrenHistories: ProfileChildrenHistory[];
@OneToMany(() => ProfileChildrenHistory, (v) => v.profileChildrenHistories)
histories: ProfileChildrenHistory[];
}
export type CreateProfileChildren = {
@ -102,7 +105,7 @@ export type CreateProfileChildrenEmployee = {
};
export type UpdateProfileChildren = {
id: string;
// id: string;
childrenCareer?: string | null;
childrenFirstName?: string | null;
childrenLastName?: string | null;

View file

@ -57,9 +57,13 @@ export class ProfileChildrenHistory extends EntityBase {
})
profileChildrenId: string;
@ManyToOne(() => ProfileChildren, (profileChildren) => profileChildren.profileChildrenHistories)
// @ManyToOne(() => ProfileChildren, (profileChildren) => profileChildren.profileChildrenHistories)
// @JoinColumn({ name: "profileChildrenId" })
// histories: ProfileChildren;
@ManyToOne(() => ProfileChildren, (v) => v.histories)
@JoinColumn({ name: "profileChildrenId" })
histories: ProfileChildren;
profileChildrenHistories: ProfileChildren;
}
export type CreateChildren = {