family entity (father, mother, couple)
This commit is contained in:
parent
291d3199d2
commit
968842557a
8 changed files with 575 additions and 0 deletions
61
src/entities/ProfileFamilyMotherHistory.ts
Normal file
61
src/entities/ProfileFamilyMotherHistory.ts
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn, OneToMany } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { ProfileFamilyMother } from "./ProfileFamilyMother";
|
||||
|
||||
@Entity("profileFamilyMotherHistory")
|
||||
export class ProfileFamilyMotherHistory extends EntityBase {
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
default: null,
|
||||
comment: "คำนำหน้ามารดา",
|
||||
})
|
||||
motherPrefix: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
default: null,
|
||||
comment: "ชื่อมารดา",
|
||||
})
|
||||
motherFirstName: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
default: null,
|
||||
comment: "นามสกุลมารดา",
|
||||
})
|
||||
motherLastName: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
default: null,
|
||||
comment: "อาชีพบิดา",
|
||||
})
|
||||
motherCareer: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
default: null,
|
||||
comment: "เลขที่บัตรประชาชนมารดา",
|
||||
})
|
||||
motherCitizenId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
default: null,
|
||||
comment: "มีชีวิตมารดา",
|
||||
})
|
||||
motherLive: boolean;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง ProfileFamilyMother",
|
||||
default: null,
|
||||
})
|
||||
profileFamilyMotherId: string;
|
||||
|
||||
@ManyToOne(() => ProfileFamilyMother, (v) => v.profileFamilyMother)
|
||||
@JoinColumn({ name: "profileFamilyMotherId" })
|
||||
histories: ProfileFamilyMother;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue