refactor!: merge information into profile

This commit is contained in:
Methapon2001 2024-03-21 10:10:22 +07:00
parent fc712baa8f
commit 122e00d065
5 changed files with 119 additions and 200 deletions

View file

@ -1,7 +1,7 @@
import { Entity, Column, OneToMany } from "typeorm";
import { EntityBase } from "./base/Base";
import { ProfileInformation } from "./ProfileInformation";
import { Profile } from "./Profile";
@Entity("relationship")
export class Relationship extends EntityBase {
@ -13,12 +13,11 @@ export class Relationship extends EntityBase {
})
name: string;
@OneToMany(() => ProfileInformation, (profileInformation) => profileInformation.relationshipId)
profileInformations: ProfileInformation[];
@OneToMany(() => Profile, (v) => v.relationship)
profile: Profile[];
}
export class CreateRelationship {
@Column()
name: string;
}