family entity (father, mother, couple)
This commit is contained in:
parent
291d3199d2
commit
968842557a
8 changed files with 575 additions and 0 deletions
60
src/entities/ProfileFamilyFatherHistory.ts
Normal file
60
src/entities/ProfileFamilyFatherHistory.ts
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn, OneToMany } from "typeorm";
|
||||
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;
|
||||
|
||||
@ManyToOne(() => ProfileFamilyFather, (v) => v.profileFamilyFather)
|
||||
@JoinColumn({ name: "profileFamilyFatherId" })
|
||||
histories: ProfileFamilyFather;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue