เพิ่มรอบในแบบแผน
This commit is contained in:
parent
2f50a1983b
commit
4f54040982
3 changed files with 45 additions and 3 deletions
|
|
@ -1,5 +1,7 @@
|
||||||
import { Entity, Column } from "typeorm";
|
import { Entity, Column, OneToMany } from "typeorm";
|
||||||
import { EntityBase } from "./base/Base";
|
import { EntityBase } from "./base/Base";
|
||||||
|
import { KpiPlan } from "./kpiPlan";
|
||||||
|
import { KpiRole } from "./kpiRole";
|
||||||
|
|
||||||
@Entity("kpiPeriod")
|
@Entity("kpiPeriod")
|
||||||
export class KpiPeriod extends EntityBase {
|
export class KpiPeriod extends EntityBase {
|
||||||
|
|
@ -37,6 +39,12 @@ export class KpiPeriod extends EntityBase {
|
||||||
default: true,
|
default: true,
|
||||||
})
|
})
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
|
|
||||||
|
@OneToMany(() => KpiRole, (kpiRole) => kpiRole.kpiPeriod)
|
||||||
|
kpiRoles: KpiRole[];
|
||||||
|
|
||||||
|
@OneToMany(() => KpiPlan, (kpiPlan) => kpiPlan.kpiPeriod)
|
||||||
|
kpiPlans: KpiPlan[];
|
||||||
}
|
}
|
||||||
export class createKpiPeriod {
|
export class createKpiPeriod {
|
||||||
@Column()
|
@Column()
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import { Entity, Column, OneToMany } from "typeorm";
|
import { Entity, Column, OneToMany, ManyToOne, JoinColumn } from "typeorm";
|
||||||
import { EntityBase } from "./base/Base";
|
import { EntityBase } from "./base/Base";
|
||||||
import { KpiLink } from "./kpiLink";
|
import { KpiLink } from "./kpiLink";
|
||||||
|
import { KpiPeriod } from "./kpiPeriod";
|
||||||
|
|
||||||
@Entity("kpiPlan")
|
@Entity("kpiPlan")
|
||||||
export class KpiPlan extends EntityBase {
|
export class KpiPlan extends EntityBase {
|
||||||
|
|
@ -287,6 +288,18 @@ export class KpiPlan extends EntityBase {
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
strategyChild5: string;
|
strategyChild5: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
length: 40,
|
||||||
|
comment: "ไอดีรอบ",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
kpiPeriodId: string | null;
|
||||||
|
|
||||||
|
@ManyToOne(() => KpiPeriod, (kpiPeriod) => kpiPeriod.kpiPlans)
|
||||||
|
@JoinColumn({ name: "kpiPeriodId" })
|
||||||
|
kpiPeriod: KpiPeriod;
|
||||||
}
|
}
|
||||||
export class createKpiPlan {
|
export class createKpiPlan {
|
||||||
@Column()
|
@Column()
|
||||||
|
|
@ -327,6 +340,8 @@ export class createKpiPlan {
|
||||||
strategy: number;
|
strategy: number;
|
||||||
@Column()
|
@Column()
|
||||||
strategyId: string | null;
|
strategyId: string | null;
|
||||||
|
@Column()
|
||||||
|
kpiPeriodId: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class updateKpiPlan {
|
export class updateKpiPlan {
|
||||||
|
|
@ -368,4 +383,6 @@ export class updateKpiPlan {
|
||||||
strategy: number;
|
strategy: number;
|
||||||
@Column()
|
@Column()
|
||||||
strategyId: string | null;
|
strategyId: string | null;
|
||||||
|
@Column()
|
||||||
|
kpiPeriodId: string | null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import { Entity, Column, OneToMany } from "typeorm";
|
import { Entity, Column, OneToMany, ManyToOne, JoinColumn } from "typeorm";
|
||||||
import { EntityBase } from "./base/Base";
|
import { EntityBase } from "./base/Base";
|
||||||
import { KpiLink } from "./kpiLink";
|
import { KpiLink } from "./kpiLink";
|
||||||
|
import { KpiPeriod } from "./kpiPeriod";
|
||||||
|
|
||||||
@Entity("kpiRole")
|
@Entity("kpiRole")
|
||||||
export class KpiRole extends EntityBase {
|
export class KpiRole extends EntityBase {
|
||||||
|
|
@ -219,6 +220,18 @@ export class KpiRole extends EntityBase {
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
formula: string;
|
formula: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
length: 40,
|
||||||
|
comment: "ไอดีรอบ",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
kpiPeriodId: string | null;
|
||||||
|
|
||||||
|
@ManyToOne(() => KpiPeriod, (kpiPeriod) => kpiPeriod.kpiRoles)
|
||||||
|
@JoinColumn({ name: "kpiPeriodId" })
|
||||||
|
kpiPeriod: KpiPeriod;
|
||||||
}
|
}
|
||||||
export class createKpiRole {
|
export class createKpiRole {
|
||||||
@Column()
|
@Column()
|
||||||
|
|
@ -257,6 +270,8 @@ export class createKpiRole {
|
||||||
meaning: string | null;
|
meaning: string | null;
|
||||||
@Column()
|
@Column()
|
||||||
formula: string | null;
|
formula: string | null;
|
||||||
|
@Column()
|
||||||
|
kpiPeriodId: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class updateKpiRole {
|
export class updateKpiRole {
|
||||||
|
|
@ -296,4 +311,6 @@ export class updateKpiRole {
|
||||||
meaning: string | null;
|
meaning: string | null;
|
||||||
@Column()
|
@Column()
|
||||||
formula: string | null;
|
formula: string | null;
|
||||||
|
@Column()
|
||||||
|
kpiPeriodId: string | null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue