kpi plan
This commit is contained in:
parent
c4a975b503
commit
a9dd103ff8
16 changed files with 1484 additions and 15 deletions
25
src/entities/kpiLink.ts
Normal file
25
src/entities/kpiLink.ts
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn, ManyToMany, OneToMany } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { KpiGroup } from "./kpiGroup";
|
||||
import { KpiCapacity } from "./kpiCapacity";
|
||||
import { Position } from "./position";
|
||||
|
||||
@Entity("kpiLink")
|
||||
export class KpiLink extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "ไอดีกลุ่มงาน",
|
||||
})
|
||||
kpiGroupId: string | null;
|
||||
|
||||
@ManyToOne(() => KpiGroup, (kpiGroup) => kpiGroup.kpiLinks)
|
||||
@JoinColumn({ name: "kpiGroupId" })
|
||||
kpiGroup: KpiGroup;
|
||||
|
||||
@ManyToMany(() => KpiCapacity, (kpiCapacity) => kpiCapacity.kpiLinks)
|
||||
kpiCapacitys: KpiCapacity[];
|
||||
|
||||
@OneToMany(() => Position, (position) => position.kpiLink)
|
||||
positions: Position[];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue