import { Entity, Column, OneToMany } from "typeorm"; import { EntityBase } from "./base/Base"; import { ProfileInformation } from "./ProfileInformation"; @Entity("gender") export class Gender extends EntityBase { @Column({ nullable: true, comment: "เพศ", length: 255, default: null, }) name: string; @OneToMany(() => ProfileInformation, (profileInformation) => profileInformation.genderId) profileInformations: ProfileInformation[]; } export class CreateGender { @Column() name: string; } export type UpdateGender = Partial;