48 lines
1 KiB
TypeScript
48 lines
1 KiB
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({
|
|
nullable: true,
|
|
type: "longtext",
|
|
comment: "คำอธิบายระดับ",
|
|
default: null,
|
|
})
|
|
description: string;
|
|
|
|
@Column({
|
|
nullable: true,
|
|
comment: "ระดับ",
|
|
default: null,
|
|
})
|
|
level: string;
|
|
|
|
@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: string;
|
|
}
|
|
|
|
export class updateKpiCapacityDetail {
|
|
@Column()
|
|
description: string;
|
|
|
|
@Column()
|
|
level: string;
|
|
}
|