import { Entity, Column, OneToMany } from "typeorm"; import { EntityBase } from "./base/Base"; import { Profile } from "./Profile"; @Entity("relationship") export class Relationship extends EntityBase { @Column({ nullable: true, comment: "สถานภาพ", length: 255, default: null, }) name: string; @OneToMany(() => Profile, (v) => v.relationship) profile: Profile[]; } export class CreateRelationship { name: string; } export type UpdateRelationship = Partial;