import { Entity, Column, ManyToOne, JoinColumn, OneToMany } from "typeorm"; import { EntityBase } from "./base/Base"; import { ProfileFamilyCouple } from "./ProfileFamilyCouple"; @Entity("profileFamilyCoupleHistory") export class ProfileFamilyCoupleHistory 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, }) profileFamilyCoupleId: string; @ManyToOne(() => ProfileFamilyCouple, (v) => v.profileFamilyCouple) @JoinColumn({ name: "profileFamilyCoupleId" }) histories: ProfileFamilyCouple; }