เพิ่มฟิลด์ employeePosLevel.posLevelAuthority

This commit is contained in:
Bright 2024-03-14 14:02:17 +07:00
parent ac1599485a
commit a069c81d41
3 changed files with 37 additions and 5 deletions

View file

@ -3,6 +3,11 @@ import { EntityBase } from "./base/Base";
import { EmployeePosDict } from "./EmployeePosDict";
import { EmployeePosType } from "./EmployeePosType";
enum EmployeePosLevelAuthoritys {
HEAD = "HEAD",
DEPUTY = "DEPUTY",
GOVERNOR = "GOVERNOR",
}
@Entity("employeePosLevel")
export class EmployeePosLevel extends EntityBase {
@Column({
@ -17,6 +22,16 @@ export class EmployeePosLevel extends EntityBase {
})
posLevelRank: number;
@Column({
nullable: true,
comment:
"ผู้มีอำนาจสั่งบรรจุของระดับนี้ head = หัวหน้าหน่วยงาน , deputy = ปลัด , governor = ผู้ว่าฯ",
type: "enum",
enum: EmployeePosLevelAuthoritys,
default: null,
})
posLevelAuthority: EmployeePosLevelAuthoritys;
@Column({
length: 40,
comment: "คีย์นอก(FK)ของตาราง employeePosType",
@ -38,8 +53,11 @@ export class CreateEmployeePosLevel {
@Column()
posLevelRank: number;
@Column()
posLevelAuthority: string;
@Column("uuid")
posTypeId: string;
}
export type UpdateEmployeePosLevel = Partial<CreateEmployeePosLevel>;
export type UpdateEmployeePosLevel = Partial<CreateEmployeePosLevel> & { posLevelAuthority: EmployeePosLevelAuthoritys };