2024-03-12 12:14:18 +07:00
|
|
|
import { Entity, Column, ManyToOne, JoinColumn, OneToMany } from "typeorm";
|
|
|
|
|
import { EntityBase } from "./base/Base";
|
|
|
|
|
import { EmployeePosDict } from "./EmployeePosDict";
|
|
|
|
|
import { EmployeePosType } from "./EmployeePosType";
|
|
|
|
|
|
|
|
|
|
@Entity("employeePosLevel")
|
|
|
|
|
export class EmployeePosLevel extends EntityBase {
|
|
|
|
|
@Column({
|
|
|
|
|
comment: "ชื่อระดับชั้นงาน",
|
2024-03-12 12:18:41 +07:00
|
|
|
type: "int",
|
2024-03-12 12:14:18 +07:00
|
|
|
})
|
2024-03-12 12:18:41 +07:00
|
|
|
posLevelName: number;
|
2024-03-12 12:14:18 +07:00
|
|
|
|
|
|
|
|
@Column({
|
|
|
|
|
comment: "ระดับของระดับชั้นงาน",
|
|
|
|
|
type: "int",
|
|
|
|
|
})
|
|
|
|
|
posLevelRank: number;
|
|
|
|
|
|
|
|
|
|
@Column({
|
|
|
|
|
length: 40,
|
|
|
|
|
comment: "คีย์นอก(FK)ของตาราง employeePosType",
|
|
|
|
|
})
|
|
|
|
|
employeePosTypeId: string;
|
|
|
|
|
|
|
|
|
|
@ManyToOne(() => EmployeePosType, (employeePosType) => employeePosType.employeePosLevels)
|
|
|
|
|
@JoinColumn({ name: "employeePosTypeId" })
|
|
|
|
|
employeePosType: EmployeePosType;
|
|
|
|
|
|
|
|
|
|
@OneToMany(() => EmployeePosDict, (employeePosDict) => employeePosDict.employeePosLevel)
|
|
|
|
|
employeePosDicts: EmployeePosDict[];
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export class CreateEmployeePosLevel {
|
|
|
|
|
@Column()
|
2024-03-12 12:18:41 +07:00
|
|
|
posLevelName: number;
|
2024-03-12 12:14:18 +07:00
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
|
posLevelRank: number;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export type UpdateEmployeePosLevel= Partial<CreateEmployeePosLevel>;
|