32 lines
987 B
TypeScript
32 lines
987 B
TypeScript
|
|
import { Entity, Column, OneToMany, ManyToOne, JoinColumn } from "typeorm";
|
||
|
|
import { EntityBase } from "./base/Base";
|
||
|
|
import { KpiCapacity } from "./kpiCapacity";
|
||
|
|
import { KpiUserEvaluation } from "./kpiUserEvaluation";
|
||
|
|
|
||
|
|
@Entity("kpiUserGroup")
|
||
|
|
export class KpiUserGroup extends EntityBase {
|
||
|
|
@Column({
|
||
|
|
nullable: true,
|
||
|
|
length: 40,
|
||
|
|
comment: "คีย์นอก(FK)ของตาราง kpiUserEvaluation",
|
||
|
|
default: null,
|
||
|
|
})
|
||
|
|
kpiUserEvaluationId: string;
|
||
|
|
|
||
|
|
@ManyToOne(() => KpiUserEvaluation, (kpiUserEvaluation) => kpiUserEvaluation.kpiUserGroups)
|
||
|
|
@JoinColumn({ name: "kpiUserEvaluationId" })
|
||
|
|
kpiUserEvaluations: KpiUserEvaluation;
|
||
|
|
|
||
|
|
@Column({
|
||
|
|
nullable: true,
|
||
|
|
length: 40,
|
||
|
|
comment: "คีย์นอก(FK)ของตาราง kpiCapacity",
|
||
|
|
default: null,
|
||
|
|
})
|
||
|
|
kpiCapacityId: string;
|
||
|
|
|
||
|
|
@ManyToOne(() => KpiCapacity, (kpiCapacity) => kpiCapacity.kpiUserGroups)
|
||
|
|
@JoinColumn({ name: "kpiCapacityId" })
|
||
|
|
kpiCapacitys: KpiCapacity;
|
||
|
|
}
|