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