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