ปรับrelation geverment
This commit is contained in:
parent
566b4db692
commit
0d86a02f5b
2 changed files with 5 additions and 1 deletions
|
|
@ -20,6 +20,7 @@ import { ProfileEducation } from "./ProfileEducation";
|
|||
import { ProfileAbility } from "./ProfileAbility";
|
||||
import { ProfileOther } from "./ProfileOther";
|
||||
import { ProfileAvatar } from "./ProfileAvatar";
|
||||
import { ProfileGovernment } from "./ProfileGovernment";
|
||||
@Entity("profileEmployee")
|
||||
export class ProfileEmployee extends EntityBase {
|
||||
@Column({
|
||||
|
|
@ -274,6 +275,9 @@ export class ProfileEmployee extends EntityBase {
|
|||
|
||||
@OneToMany(() => ProfileEmployeeHistory, (v) => v.profileEmployee)
|
||||
histories: ProfileEmployeeHistory[];
|
||||
|
||||
@OneToMany(() => ProfileGovernment, (v) => v.profileEmployee)
|
||||
profileGovernment: ProfileGovernment[];
|
||||
}
|
||||
|
||||
@Entity("profileEmployeeHistory")
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ export class ProfileGovernment extends EntityBase {
|
|||
@JoinColumn({ name: "profileId" })
|
||||
profile: Profile;
|
||||
|
||||
@ManyToOne(() => ProfileEmployee, (ProfileEmployee) => ProfileEmployee.profileTrainings)
|
||||
@ManyToOne(() => ProfileEmployee, (v) => v.profileGovernment)
|
||||
@JoinColumn({ name: "profileEmployeeId" })
|
||||
profileEmployee: ProfileEmployee;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue