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