ปรับ children
This commit is contained in:
parent
1a017dcd76
commit
4fa11d2aea
5 changed files with 75 additions and 29 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue