api ชื่อโครงการ/กิจกรรม/หลักสูตร

This commit is contained in:
Kittapath 2024-04-03 00:55:40 +07:00
parent 9da7f47cf6
commit c2af2a3b08
20 changed files with 1819 additions and 57 deletions

47
src/entities/PosType.ts Normal file
View file

@ -0,0 +1,47 @@
import { Entity, Column, OneToMany } from "typeorm";
import { EntityBase } from "./base/Base";
import { PosLevel } from "./PosLevel";
import { ActualGoal } from "./ActualGoal";
import { PlannedGoal } from "./PlannedGoal";
import { DevelopmentHistory } from "./DevelopmentHistory";
@Entity("posType")
export class PosType extends EntityBase {
@Column({
nullable: true,
comment: "ชื่อประเภทตำแหน่ง (ทั่วไป วิชาการ อำนวยการ บริหาร)",
length: 255,
default: null,
})
posTypeName: string;
@Column({
nullable: true,
comment:
"ระดับของประเภทตำแหน่ง ไว้ใช้ระบุว่าประเภทตำแหน่งนี้อยู่ระดับสูงหรือต่ำกว่ากัน โดย 1 = ต่ำกว่า , มากกว่า 1 = สูงกว่า ทั่วไป = 1 วิชาการ = 2 อำนวยการ = 3 บริหาร = 4",
default: null,
})
posTypeRank: number;
@OneToMany(() => PosLevel, (posLevel: PosLevel) => posLevel.posType)
posLevels: PosLevel[];
@OneToMany(() => ActualGoal, (actualGoal: ActualGoal) => actualGoal.posTypeActual)
actualGoals: ActualGoal[];
@OneToMany(() => PlannedGoal, (plannedGoal: PlannedGoal) => plannedGoal.posTypePlanned)
plannedGoals: PlannedGoal[];
@OneToMany(() => DevelopmentHistory, (developmentHistory) => developmentHistory.posType)
developmentHistorys: DevelopmentHistory[];
}
export class CreatePosType {
@Column()
posTypeName: string;
@Column()
posTypeRank: number;
}
export type UpdatePosType = Partial<CreatePosType>;