family entity (father, mother, couple)

This commit is contained in:
Bright 2024-05-14 17:39:32 +07:00
parent 291d3199d2
commit 968842557a
8 changed files with 575 additions and 0 deletions

View file

@ -22,6 +22,9 @@ import { Province } from "./Province";
import { SubDistrict } from "./SubDistrict";
import { District } from "./District";
import { ProfileAvatar } from "./ProfileAvatar";
import { ProfileFamilyFather } from "./ProfileFamilyFather";
import { ProfileFamilyMother } from "./ProfileFamilyMother";
import { ProfileFamilyCouple } from "./ProfileFamilyCouple";
@Entity("profile")
export class Profile extends EntityBase {
@ -317,6 +320,15 @@ export class Profile extends EntityBase {
@OneToMany(() => ProfileHistory, (v) => v.profile)
histories: ProfileHistory[];
@OneToMany(() => ProfileFamilyFather, (v) => v.profile)
profileFamilyFather: ProfileFamilyFather[];
@OneToMany(() => ProfileFamilyMother, (v) => v.profile)
profileFamilyMother: ProfileFamilyMother[];
@OneToMany(() => ProfileFamilyCouple , (v) => v.profile)
profileFamilyCouple: ProfileFamilyCouple[];
@ManyToOne(() => PosLevel, (posLevel) => posLevel.profiles)
@JoinColumn({ name: "posLevelId" })
posLevel: PosLevel;