fix: entity fields

This commit is contained in:
Methapon2001 2024-03-21 11:38:13 +07:00
parent f769a0820c
commit c20676af5d
2 changed files with 10 additions and 9 deletions

View file

@ -70,15 +70,13 @@ export class ProfileLeave extends EntityBase {
})
reason: string;
@OneToMany(() => ProfileLeaveHistory, (profileLeaveHistory) => profileLeaveHistory.histories)
@OneToMany(() => ProfileLeaveHistory, (v) => v.histories)
profileLeaves: ProfileLeaveHistory[];
@ManyToOne(() => LeaveType, (leaveType) => leaveType.profileLeave)
@JoinColumn({ name: "leaveTypeId" })
@ManyToOne(() => LeaveType, (v) => v.profileLeave)
leaveType: LeaveType;
@ManyToOne(() => Profile, (profile) => profile.profileLeaves)
@JoinColumn({ name: "profileId" })
@ManyToOne(() => Profile, (v) => v.profileLeaves)
profile: Profile;
}