fix: religion relation

This commit is contained in:
Methapon2001 2024-03-21 16:29:51 +07:00
parent c32883f2e8
commit 02878b769b
3 changed files with 37 additions and 21 deletions

View file

@ -8,6 +8,7 @@ import { ProfileDisciplineEmployee } from "./ProfileDisciplineEmployee";
import { BloodGroup } from "./BloodGroup";
import { Relationship } from "./Relationship";
import { Gender } from "./Gender";
import { Religion } from "./Religion";
@Entity("profileEmployee")
export class ProfileEmployee extends EntityBase {
@ -125,14 +126,6 @@ export class ProfileEmployee extends EntityBase {
})
ethnicity: string;
@Column({
nullable: true,
comment: "ศาสนา",
length: 255,
default: null,
})
religion: string;
@Column({
nullable: true,
comment: "เบอร์โทร",
@ -163,6 +156,17 @@ export class ProfileEmployee extends EntityBase {
@ManyToOne(() => Relationship, (v) => v.profileEmployee)
relationship: Relationship;
@Column({
nullable: true,
comment: "ศาสนา",
length: 255,
default: null,
})
religionId: string;
@ManyToOne(() => Religion, (v) => v.profile)
religion: Religion;
@Column({
nullable: true,
comment: "กรุ๊ปเลือด",
@ -220,9 +224,9 @@ export class CreateProfileEmployee {
birthDate: Date | null;
salaryLevel: number | null;
ethnicity: string | null;
religion: string | null;
telephoneNumber: string | null;
citizenId: string;
religionId: string | null;
posLevelId: string | null;
posTypeId: string | null;
genderId: string | null;
@ -240,9 +244,9 @@ export type UpdateProfileEmployee = {
birthDate?: Date | null;
salaryLevel?: number | null;
ethnicity?: string | null;
religion?: string | null;
telephoneNumber?: string | null;
citizenId?: string;
religionId: string | null;
posLevelId?: string | null;
posTypeId?: string | null;
genderId?: string | null;