import { Entity, Column, ManyToOne, JoinColumn } from "typeorm"; import { EntityBase } from "./base/Base"; import { KpiUserEvaluation } from "./kpiUserEvaluation"; @Entity("kpiUserDevelopment") export class KpiUserDevelopment extends EntityBase { @Column({ nullable: true, comment: "ชื่อเรื่อง", default: null, }) name: string; @Column({ nullable: true, comment: "เป้าหมาย", default: null, }) target: string; @Column({ type: "double", nullable: true, default: null, comment: "ผลการประเมิน", }) summary: number; @Column({ nullable: true, comment: "เกณฑ์การประเมิน 10", default: null, }) achievement10: string; @Column({ nullable: true, comment: "เกณฑ์การประเมิน 5", default: null, }) achievement5: string; @Column({ nullable: true, comment: "เกณฑ์การประเมิน 0", default: null, }) achievement0: string; @Column({ nullable: true, length: 40, comment: "คีย์นอก(FK)ของตาราง kpiUserEvaluation", default: null, }) kpiUserEvaluationId: string; @ManyToOne(() => KpiUserEvaluation, (kpiUserEvaluation) => kpiUserEvaluation.kpiUserDevelopments) @JoinColumn({ name: "kpiUserEvaluationId" }) kpiUserEvaluation: KpiUserEvaluation; } export class CreateKpiUserSpecial { @Column() including: string | null; @Column() includingName: string | null; @Column() achievement1: string | null; @Column() achievement2: string | null; @Column() achievement3: string | null; @Column() achievement4: string | null; @Column() achievement5: string | null; @Column() target: string; @Column() unit: number; @Column() weight: number; @Column() meaning: string; @Column() formula: string; @Column("uuid") kpiUserEvaluationId: string; } export class UpdateKpiUserSpecial { @Column() including: string | null; @Column() includingName: string | null; @Column() achievement1: string | null; @Column() achievement2: string | null; @Column() achievement3: string | null; @Column() achievement4: string | null; @Column() achievement5: string | null; @Column() target: string; @Column() unit: number; @Column() weight: number; @Column() meaning: string; @Column() formula: string; @Column("uuid") kpiUserEvaluationId: string; } export class KpiUserSpecialDataPoint { id: string; point: number; }