er ฝั่ง user

This commit is contained in:
Kittapath 2024-04-22 15:50:04 +07:00
parent 27da57f35e
commit fae8d38013
16 changed files with 870 additions and 72 deletions

View file

@ -0,0 +1,66 @@
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { KpiUserEvaluation } from "./kpiUserEvaluation";
import { KpiPlan } from "./kpiPlan";
@Entity("kpiUserPlanned")
export class KpiUserPlanned extends EntityBase {
@Column({
nullable: true,
comment: "ค่าเป้าหมาย",
default: null,
})
target: string;
@Column({
nullable: true,
comment: "หน่วยนับ",
default: null,
})
unit: number;
@Column({
nullable: true,
comment: "น้ำหนัก",
default: null,
})
weight: number;
@Column({
nullable: true,
comment: "นิยามหรือความหมาย",
default: null,
})
meaning: string;
@Column({
nullable: true,
comment: "สูตรคำนวณ",
default: null,
})
formula: string;
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง kpiUserEvaluation",
default: null,
})
kpiUserEvaluationId: string;
@ManyToOne(() => KpiUserEvaluation, (kpiUserEvaluation) => kpiUserEvaluation.kpiUserPlanneds)
@JoinColumn({ name: "kpiUserEvaluationId" })
kpiUserEvaluations: KpiUserEvaluation;
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง kpiPlan",
default: null,
})
kpiPlanId: string;
@ManyToOne(() => KpiPlan, (kpiPlan) => kpiPlan.kpiUserPlanneds)
@JoinColumn({ name: "kpiPlanId" })
kpiPlans: KpiPlan;
}