import { Entity, Column, OneToMany } from "typeorm"; import { EntityBase } from "./base/Base"; import { Profile } from "./Profile"; @Entity("bloodGroup") export class BloodGroup extends EntityBase { @Column({ nullable: true, comment: "กรุ๊ปเลือด", length: 255, default: null, }) name: string; @OneToMany(() => Profile, (v) => v.bloodGroup) profile: Profile[]; } export class CreateBloodGroup { @Column() name: string; } export type UpdateBloodGroup = Partial;