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