76 lines
1.5 KiB
TypeScript
76 lines
1.5 KiB
TypeScript
|
|
import { Entity, Column, OneToMany, ManyToOne, JoinColumn } from "typeorm";
|
||
|
|
import { EntityBase } from "./base/Base";
|
||
|
|
import { KpiPeriod } from "./kpiPeriod";
|
||
|
|
@Entity("kpiUserEvaluation")
|
||
|
|
export class KpiUserEvaluation extends EntityBase {
|
||
|
|
@Column({
|
||
|
|
nullable: true,
|
||
|
|
comment: "คำนำหน้า",
|
||
|
|
length: 255,
|
||
|
|
default: null,
|
||
|
|
})
|
||
|
|
prefix: string;
|
||
|
|
|
||
|
|
@Column({
|
||
|
|
nullable: true,
|
||
|
|
comment: "ชื่อ",
|
||
|
|
length: 255,
|
||
|
|
default: null,
|
||
|
|
})
|
||
|
|
firstName: string;
|
||
|
|
|
||
|
|
@Column({
|
||
|
|
nullable: true,
|
||
|
|
comment: "สกุล",
|
||
|
|
length: 255,
|
||
|
|
default: null,
|
||
|
|
})
|
||
|
|
lastName: string;
|
||
|
|
|
||
|
|
@Column({
|
||
|
|
nullable: true,
|
||
|
|
length: 40,
|
||
|
|
comment: "คีย์นอก(FK)ของตาราง kpiPeriodId",
|
||
|
|
default: null,
|
||
|
|
})
|
||
|
|
kpiPeriodId: string;
|
||
|
|
|
||
|
|
@Column({
|
||
|
|
nullable: true,
|
||
|
|
length: 40,
|
||
|
|
comment: "ไอดีโปรไฟล์",
|
||
|
|
default: null,
|
||
|
|
})
|
||
|
|
profileId: string;
|
||
|
|
|
||
|
|
@ManyToOne(() => KpiPeriod, (kpiPeriod) => kpiPeriod.kpiUserEvaluation)
|
||
|
|
@JoinColumn({ name: "kpiPeriodId" })
|
||
|
|
kpiPeriod: KpiPeriod;
|
||
|
|
}
|
||
|
|
|
||
|
|
export class createKpiUserEvaluation {
|
||
|
|
@Column()
|
||
|
|
prefix: string;
|
||
|
|
@Column()
|
||
|
|
firstName: string;
|
||
|
|
@Column()
|
||
|
|
lastName: string;
|
||
|
|
@Column()
|
||
|
|
kpiPeriodId: string;
|
||
|
|
@Column()
|
||
|
|
profileId: string;
|
||
|
|
}
|
||
|
|
|
||
|
|
export class updateKpiUserEvaluation {
|
||
|
|
@Column()
|
||
|
|
prefix: string;
|
||
|
|
@Column()
|
||
|
|
firstName: string;
|
||
|
|
@Column()
|
||
|
|
lastName: string;
|
||
|
|
@Column()
|
||
|
|
kpiPeriodId: string;
|
||
|
|
@Column()
|
||
|
|
profileId: string;
|
||
|
|
}
|