87 lines
2.2 KiB
TypeScript
87 lines
2.2 KiB
TypeScript
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
|
|
import { EntityBase } from "./base/Base";
|
|
import { PosType } from "./PosType";
|
|
import { PosLevel } from "./PosLevel";
|
|
import { PlannedGoal } from "./PlannedGoal";
|
|
|
|
@Entity("plannedGoalPosition")
|
|
export class PlannedGoalPosition extends EntityBase {
|
|
@Column({
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "ตำแหน่ง",
|
|
default: null,
|
|
})
|
|
position: string;
|
|
|
|
@Column({
|
|
nullable: true,
|
|
comment: "ตำแหน่งทางการบริหาร",
|
|
default: null,
|
|
})
|
|
posExecutive: string;
|
|
|
|
@Column({
|
|
nullable: true,
|
|
comment: "ประเภทตำแหน่ง & กลุ่มงาน",
|
|
default: null,
|
|
})
|
|
posTypePlanned: string;
|
|
|
|
// @Column({
|
|
// nullable: true,
|
|
// comment: "ประเภทตำแหน่ง",
|
|
// default: null,
|
|
// })
|
|
// posTypePlannedId: string;
|
|
|
|
// @ManyToOne(() => PosType, (posType: PosType) => posType.plannedGoalPositions)
|
|
// @JoinColumn({ name: "posTypePlannedId" })
|
|
// posTypePlanned: PosType;
|
|
|
|
@Column({
|
|
nullable: true,
|
|
comment: "ระดับตำแหน่ง & ระดับชั้นงาน",
|
|
default: null,
|
|
})
|
|
posLevelPlanned: string;
|
|
|
|
// @Column({
|
|
// nullable: true,
|
|
// comment: "ระดับตำแหน่ง",
|
|
// default: null,
|
|
// })
|
|
// posLevelPlannedId: string;
|
|
|
|
// @ManyToOne(() => PosLevel, (posLevel: PosLevel) => posLevel.plannedGoalPositions)
|
|
// @JoinColumn({ name: "posLevelPlannedId" })
|
|
// posLevelPlanned: PosLevel;
|
|
|
|
@Column({
|
|
nullable: true,
|
|
comment: "id โครงการ",
|
|
default: null,
|
|
})
|
|
plannedGoalId: string;
|
|
|
|
@ManyToOne(() => PlannedGoal, (plannedGoal: PlannedGoal) => plannedGoal.plannedGoalPositions)
|
|
@JoinColumn({ name: "plannedGoalId" })
|
|
plannedGoal: PlannedGoal;
|
|
}
|
|
|
|
export class CreatePlannedGoalPosition {
|
|
@Column()
|
|
position: string | null;
|
|
@Column()
|
|
posExecutive: string | null;
|
|
// @Column()
|
|
// posTypePlannedId: string | null;
|
|
// @Column()
|
|
// posLevelPlannedId: string | null;
|
|
@Column()
|
|
posTypePlanned: string | null;
|
|
@Column()
|
|
posLevelPlanned: string | null;
|
|
}
|
|
|
|
export type UpdatePlannedGoalPosition = Partial<CreatePlannedGoalPosition>;
|