hrms-api-org/src/entities/BloodGroup.ts

25 lines
532 B
TypeScript
Raw Normal View History

2024-03-20 09:09:42 +07:00
import { Entity, Column, OneToMany } from "typeorm";
2024-02-02 10:47:19 +07:00
import { EntityBase } from "./base/Base";
import { Profile } from "./Profile";
2024-03-20 09:09:42 +07:00
2024-02-02 10:47:19 +07:00
@Entity("bloodGroup")
export class BloodGroup extends EntityBase {
@Column({
nullable: true,
comment: "กรุ๊ปเลือด",
length: 255,
default: null,
})
name: string;
2024-03-20 09:09:42 +07:00
@OneToMany(() => Profile, (v) => v.bloodGroup)
profile: Profile[];
2024-02-02 10:47:19 +07:00
}
export class CreateBloodGroup {
@Column()
name: string;
2024-02-02 10:47:19 +07:00
}
export type UpdateBloodGroup = Partial<CreateBloodGroup>;