edit entity

This commit is contained in:
AdisakKanthawilang 2024-05-03 16:44:44 +07:00
parent 3ce3bed13a
commit 94039ac694
4 changed files with 82 additions and 17 deletions

View file

@ -3,15 +3,16 @@ import { EntityBase } from "./base/Base";
import { KpiLink } from "./kpiLink";
import { KpiPeriod } from "./kpiPeriod";
import { KpiUserPlanned } from "./kpiUserPlanned";
import { KpiPlanHistory } from "./kpiPlanHistory";
@Entity("kpiPlan")
export class KpiPlan extends EntityBase {
@Column({
nullable: true,
comment: "รหัสตัวชี้วัด",
comment: "ลำดับ/รหัสตัวชี้วัด",
default: null,
})
including: string;
including: number;
@Column({
nullable: true,
@ -32,7 +33,7 @@ export class KpiPlan extends EntityBase {
comment: "หน่วยนับ",
default: null,
})
unit: number;
unit: string;
@Column({
nullable: true,
@ -285,22 +286,32 @@ export class KpiPlan extends EntityBase {
})
kpiPeriodId: string | null;
@Column({
nullable: true,
comment: "ข้อมูลเอกสารหลักฐาน",
default: null,
})
documentInfoEvidence: string;
@ManyToOne(() => KpiPeriod, (kpiPeriod) => kpiPeriod.kpiPlans)
@JoinColumn({ name: "kpiPeriodId" })
kpiPeriod: KpiPeriod;
@OneToMany(() => KpiUserPlanned, (kpiUserPlanned) => kpiUserPlanned.kpiPlan)
kpiUserPlanneds: KpiUserPlanned[];
@OneToMany(() => KpiPlanHistory, (kpiPlanHistory) => kpiPlanHistory.kpiPlan)
kpiPlanHistories: KpiPlanHistory[];
}
export class createKpiPlan {
@Column()
including: string | null;
// @Column()
// including: number | null;
@Column()
includingName: string | null;
@Column()
target: string | null;
@Column()
unit: number | null;
unit: string | null;
@Column()
weight: number | null;
@Column()
@ -329,17 +340,19 @@ export class createKpiPlan {
strategyId: string | null;
@Column()
kpiPeriodId: string | null;
@Column()
documentInfoEvidence: string | null;
}
export class updateKpiPlan {
@Column()
including: string | null;
// @Column()
// including: number | null;
@Column()
includingName: string | null;
@Column()
target: string | null;
@Column()
unit: number | null;
unit: string | null;
@Column()
weight: number | null;
@Column()
@ -368,4 +381,6 @@ export class updateKpiPlan {
strategyId: string | null;
@Column()
kpiPeriodId: string | null;
@Column()
documentInfoEvidence: string | null;
}