feat: add family entity

This commit is contained in:
Methapon2001 2024-03-19 18:03:10 +07:00
parent 25734e3f2d
commit 481a2c9a49
2 changed files with 339 additions and 0 deletions

View file

@ -16,6 +16,7 @@ import { ProfileAbility } from "./ProfileAbility";
import { ProfileDuty } from "./ProfileDuty";
import { ProfileNopaid } from "./ProfileNopaid";
import { ProfileOther } from "./ProfileOther";
import { ProfileFamilyHistory } from "./ProfileFamily";
@Entity("profile")
export class Profile extends EntityBase {
@ -181,6 +182,9 @@ export class Profile extends EntityBase {
@OneToMany(() => ProfileOther, (profileOther) => profileOther.profile)
profileOthers: ProfileOther[];
@OneToMany(() => ProfileFamilyHistory, (profileFamily) => profileFamily.profile)
profileFamily: ProfileFamilyHistory[];
@ManyToOne(() => PosLevel, (posLevel) => posLevel.profiles)
@JoinColumn({ name: "posLevelId" })
posLevel: PosLevel;