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

61 lines
1.4 KiB
TypeScript
Raw Normal View History

2024-10-18 11:52:35 +07:00
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
2024-05-14 17:39:32 +07:00
import { EntityBase } from "./base/Base";
import { ProfileFamilyFather } from "./ProfileFamilyFather";
@Entity("profileFamilyFatherHistory")
export class ProfileFamilyFatherHistory extends EntityBase {
@Column({
nullable: true,
default: null,
comment: "คำนำหน้าบิดา",
})
fatherPrefix: string;
@Column({
nullable: true,
default: null,
comment: "ชื่อบิดา",
})
fatherFirstName: string;
@Column({
nullable: true,
default: null,
comment: "นามสกุลบิดา",
})
fatherLastName: string;
@Column({
nullable: true,
default: null,
comment: "อาชีพบิดา",
})
fatherCareer: string;
@Column({
nullable: true,
default: null,
comment: "เลขที่บัตรประชาชนบิดา",
})
fatherCitizenId: string;
@Column({
nullable: true,
default: null,
comment: "มีชีวิตบิดา",
})
fatherLive: boolean;
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง ProfileFamilyFather",
default: null,
})
profileFamilyFatherId: string;
2024-05-15 14:34:21 +07:00
@ManyToOne(() => ProfileFamilyFather, (v) => v.histories)
2024-05-14 17:39:32 +07:00
@JoinColumn({ name: "profileFamilyFatherId" })
2024-05-15 14:34:21 +07:00
profileFamilyFather: ProfileFamilyFather;
2024-05-14 17:39:32 +07:00
}