46 lines
973 B
TypeScript
46 lines
973 B
TypeScript
|
|
import { Entity, Column, OneToMany, ManyToOne, JoinColumn} from "typeorm";
|
||
|
|
import { EntityBase } from "./base/Base";
|
||
|
|
import { KpiCapacity } from "./kpiCapacity";
|
||
|
|
|
||
|
|
@Entity("kpiCapacityDetail")
|
||
|
|
export class KpiCapacityDetail extends EntityBase {
|
||
|
|
@Column({
|
||
|
|
type: "longtext",
|
||
|
|
comment: "คำอธิบายระดับ",
|
||
|
|
})
|
||
|
|
description: string;
|
||
|
|
|
||
|
|
@Column({
|
||
|
|
comment: "ระดับ",
|
||
|
|
})
|
||
|
|
level: Number;
|
||
|
|
|
||
|
|
@Column({
|
||
|
|
nullable: true,
|
||
|
|
length: 40,
|
||
|
|
comment: "คีย์นอก(FK)ของตาราง kpiCapacity",
|
||
|
|
default: null,
|
||
|
|
})
|
||
|
|
kpiCapacityId: string;
|
||
|
|
|
||
|
|
@ManyToOne(() => KpiCapacity, (kpiCapacity) => kpiCapacity.KpiCapacityDetails)
|
||
|
|
@JoinColumn({ name: "kpiCapacityId" })
|
||
|
|
kpiCapacitys: KpiCapacity;
|
||
|
|
|
||
|
|
}
|
||
|
|
export class createKpiCapacityDetail {
|
||
|
|
@Column()
|
||
|
|
description: string;
|
||
|
|
|
||
|
|
@Column()
|
||
|
|
level: Number;
|
||
|
|
}
|
||
|
|
|
||
|
|
export class updateKpiCapacityDetail {
|
||
|
|
@Column()
|
||
|
|
description: string;
|
||
|
|
|
||
|
|
@Column()
|
||
|
|
level: Number;
|
||
|
|
}
|