Fix Entity

This commit is contained in:
Bright 2024-05-15 14:34:21 +07:00
parent 67c54e3273
commit b7ca6795cb
6 changed files with 49 additions and 35 deletions

View file

@ -7,54 +7,78 @@ export class ProfileFamilyCoupleHistory extends EntityBase {
@Column({
nullable: true,
default: null,
comment: "คำนำหน้าบิดา",
type: "boolean",
})
fatherPrefix: string;
couple: boolean;
@Column({
nullable: true,
default: null,
comment: "ชื่อบิดา",
comment: "คำนำหน้าคู่สมรส",
})
fatherFirstName: string;
couplePrefix: string;
@Column({
nullable: true,
default: null,
comment: "นามสกุลบิดา",
comment: "ชื่อคู่สมรส",
})
fatherLastName: string;
coupleFirstName: string;
@Column({
nullable: true,
default: null,
comment: "อาชีพบิดา",
comment: "นามสกุลคู่สมรส",
})
fatherCareer: string;
coupleLastName: string;
@Column({
nullable: true,
default: null,
comment: "เลขที่บัตรประชาชนบิดา",
comment: "นามสกุลคู่สมรส(เดิม)",
})
fatherCitizenId: string;
coupleLastNameOld: string;
@Column({
nullable: true,
default: null,
comment: "มีชีวิตบิดา",
comment: "อาชีพคู่สมรส",
})
fatherLive: boolean;
coupleCareer: string;
@Column({
nullable: true,
default: null,
length: 13,
comment: "เลขที่บัตรประชาชนคู่สมรส",
})
coupleCitizenId: string;
@Column({
nullable: true,
default: null,
type: "boolean",
comment: "มีชีวิตคู่สมรส",
})
coupleLive: boolean;
@Column({
nullable: true,
comment: "ความสัมพันธ์",
length: 40,
default: null,
})
relationship: string;
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง ProfileFamilyFather",
comment: "คีย์นอก(FK)ของตาราง ProfileFamilyCouple",
default: null,
})
profileFamilyCoupleId: string;
@ManyToOne(() => ProfileFamilyCouple, (v) => v.profileFamilyCouple)
@ManyToOne(() => ProfileFamilyCouple, (v) => v.histories)
@JoinColumn({ name: "profileFamilyCoupleId" })
histories: ProfileFamilyCouple;
profileFamilyCouple: ProfileFamilyCouple;
}