เพิ่มอัตราตำแหน่งลูกจ้าง
This commit is contained in:
parent
806fb21c61
commit
ee6b6f7cc2
11 changed files with 2226 additions and 106 deletions
74
src/entities/EmployeePosition.ts
Normal file
74
src/entities/EmployeePosition.ts
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { EmployeePosType } from "./EmployeePosType";
|
||||
import { EmployeePosLevel } from "./EmployeePosLevel";
|
||||
import { EmployeePosMaster } from "./EmployeePosMaster";
|
||||
|
||||
@Entity("employeePosition")
|
||||
export class EmployeePosition extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ชื่อตำแหน่ง",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
positionName: string;
|
||||
|
||||
@Column({
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง employeePosType",
|
||||
})
|
||||
posTypeId: string;
|
||||
|
||||
@Column({
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง employeePosLevel",
|
||||
})
|
||||
posLevelId: string;
|
||||
|
||||
@Column({
|
||||
comment: "เป็นตำแหน่งที่ถูกเลือกในรอบนั้นๆ หรือไม่?",
|
||||
default: false,
|
||||
})
|
||||
positionIsSelected: boolean;
|
||||
|
||||
@Column({
|
||||
length: 40,
|
||||
comment: "เชื่อมโยงกับตารางเลขที่ตำแหน่ง",
|
||||
})
|
||||
posMasterId: string;
|
||||
|
||||
@ManyToOne(() => EmployeePosMaster, (posMaster) => posMaster)
|
||||
@JoinColumn({ name: "posMasterId" })
|
||||
posMaster: EmployeePosMaster;
|
||||
|
||||
@ManyToOne(() => EmployeePosType, (posType) => posType)
|
||||
@JoinColumn({ name: "posTypeId" })
|
||||
posType: EmployeePosType;
|
||||
|
||||
@ManyToOne(() => EmployeePosLevel, (posLevel) => posLevel)
|
||||
@JoinColumn({ name: "posLevelId" })
|
||||
posLevel: EmployeePosLevel;
|
||||
}
|
||||
|
||||
export class CreateEmployeePosition {
|
||||
@Column()
|
||||
positionName: string | null;
|
||||
|
||||
@Column("uuid")
|
||||
posTypeId: string | null;
|
||||
|
||||
@Column("uuid")
|
||||
posLevelId: string | null;
|
||||
}
|
||||
|
||||
export class UpdateEmployeePosition {
|
||||
@Column()
|
||||
positionName: string;
|
||||
|
||||
@Column("uuid")
|
||||
posTypeId: string;
|
||||
|
||||
@Column("uuid")
|
||||
posLevelId: string;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue