hrms-api-org/src/entities/ProfileDisciplineHistory.ts

72 lines
1.6 KiB
TypeScript

import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { Profile } from "./Profile";
import { ProfileDiscipline } from "./ProfileDiscipline";
@Entity("profileDisciplineHistory")
export class ProfileDisciplineHistory extends EntityBase {
@Column({
nullable: true,
type: "datetime",
comment: "วันที่",
default: null,
})
date: Date;
@Column({
length: 40,
comment: "ล้างมลทิน",
type: "uuid",
})
profileDisciplineId: string;
@Column({
comment: "สถานะการใช้งาน",
default: false,
})
isActive: boolean;
@Column({
nullable: true,
comment: "ระดับความผิด",
type: "text",
default: null,
})
level: string;
@Column({
nullable: true,
comment: "รายละเอียด",
type: "text",
default: null,
})
detail: string;
@Column({
nullable: true,
type: "datetime",
comment: "เอกสารอ้างอิง (ลงวันที่)",
default: null,
})
refCommandDate: Date;
@Column({
nullable: true,
comment: "เอกสารอ้างอิง (เลขที่คำสั่ง)",
type: "text",
default: null,
})
refCommandNo: string;
@Column({
nullable: true,
comment: "ล้างมลทิน",
type: "text",
default: null,
})
unStigma: string;
@ManyToOne(() => ProfileDiscipline, (profileDiscipline) => profileDiscipline.profileDisciplineHistories)
@JoinColumn({ name: "profileDisciplineId" })
histories: ProfileDiscipline;
}