hrms-api-development/src/entities/DevelopmentEvaluation.ts
2024-04-11 11:39:56 +07:00

90 lines
2 KiB
TypeScript

import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { Development } from "./Development";
@Entity("developmentEvaluation")
export class DevelopmentEvaluation extends EntityBase {
@Column({
nullable: true,
comment: "ตัวชี้วัด",
default: null,
})
indicators: string;
@Column({
nullable: true,
comment: "เป้าหมาย",
default: null,
})
target: number;
@Column({
nullable: true,
comment: "ประเภทตัวชี้วัด",
default: null,
})
metricType: string;
@Column({
nullable: true,
comment: "วิธีการคำนวณ/เครื่องมือ",
default: null,
})
calculation: string;
@Column({
nullable: true,
comment: "ระยะเวลาวัดผล",
default: null,
})
measuRement: string;
@Column({
nullable: true,
comment: "ผลการดำเนิน",
default: null,
})
results: string;
@Column({
nullable: true,
comment: "ปัญหาอุปสรรค",
default: null,
})
obstacles: string;
@Column({
nullable: true,
comment: "ข้อเสนอเเนะ",
default: null,
})
suggestions: string;
@Column({
nullable: true,
comment: "โครงการ/หลักสูตรการฝึกอบรม",
default: null,
})
developmentId: string;
@ManyToOne(() => Development, (development: Development) => development.developmentEvaluations)
@JoinColumn({ name: "developmentId" })
development: Development;
}
export class CreateDevelopmentEvaluation {
@Column()
indicators: string | null;
@Column()
target: number | null;
@Column()
metricType: string | null;
@Column()
calculation: string | null;
@Column()
measuRement: string | null;
@Column()
results: string | null;
@Column()
obstacles: string | null;
@Column()
suggestions: string | null;
}