api ชื่อโครงการ/กิจกรรม/หลักสูตร
This commit is contained in:
parent
9da7f47cf6
commit
c2af2a3b08
20 changed files with 1819 additions and 57 deletions
95
src/entities/PlannedGoal.ts
Normal file
95
src/entities/PlannedGoal.ts
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { Development } from "./Development";
|
||||
import { PosType } from "./PosType";
|
||||
import { PosLevel } from "./PosLevel";
|
||||
|
||||
@Entity("plannedGoal")
|
||||
export class PlannedGoal extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "กลุ่มเป้าหมาย",
|
||||
default: null,
|
||||
})
|
||||
groupTarget: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "กลุ่มเป้าหมายย่อย",
|
||||
default: null,
|
||||
})
|
||||
groupTargetSub: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ตำแหน่ง",
|
||||
default: null,
|
||||
})
|
||||
position: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ประเภทตำแหน่ง",
|
||||
default: null,
|
||||
})
|
||||
posTypePlannedId: string;
|
||||
|
||||
@ManyToOne(() => PosType, (posType: PosType) => posType.plannedGoals)
|
||||
@JoinColumn({ name: "posTypePlannedId" })
|
||||
posTypePlanned: PosType;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ระดับตำแหน่ง",
|
||||
default: null,
|
||||
})
|
||||
posLevelPlannedId: string;
|
||||
|
||||
@ManyToOne(() => PosLevel, (posLevel: PosLevel) => posLevel.plannedGoals)
|
||||
@JoinColumn({ name: "posLevelPlannedId" })
|
||||
posLevelPlanned: PosLevel;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ประเภท(กลุ่มอาชีพ คุณสมบัติ)",
|
||||
default: null,
|
||||
})
|
||||
type: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "จำนวน(คน)",
|
||||
default: null,
|
||||
})
|
||||
amount: number;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "id โครงการ",
|
||||
default: null,
|
||||
})
|
||||
developmentPlannedGoalId: string;
|
||||
|
||||
@ManyToOne(() => Development, (development: Development) => development.developmentPlannedGoals)
|
||||
@JoinColumn({ name: "developmentPlannedGoalId" })
|
||||
developmentPlannedGoal: Development;
|
||||
}
|
||||
|
||||
export class CreatePlannedGoal {
|
||||
@Column()
|
||||
groupTarget: string | null;
|
||||
@Column()
|
||||
groupTargetSub: string | null;
|
||||
@Column()
|
||||
position: string | null;
|
||||
@Column()
|
||||
posTypePlannedId: string | null;
|
||||
@Column()
|
||||
posLevelPlannedId: string | null;
|
||||
@Column()
|
||||
type: string | null;
|
||||
@Column()
|
||||
amount: number | null;
|
||||
}
|
||||
|
||||
export type UpdatePlannedGoal = Partial<CreatePlannedGoal>;
|
||||
Loading…
Add table
Add a link
Reference in a new issue