add join manytomany

This commit is contained in:
Kittapath 2024-04-19 10:24:11 +07:00
parent a9dd103ff8
commit 958db36e73
2 changed files with 22 additions and 1 deletions

View file

@ -1,4 +1,4 @@
import { Entity, Column, OneToMany, ManyToOne, ManyToMany } from "typeorm";
import { Entity, Column, OneToMany, ManyToOne, ManyToMany, JoinTable } from "typeorm";
import { EntityBase } from "./base/Base";
import { KpiCapacityDetail } from "./kpiCapacityDetail";
import { KpiLink } from "./kpiLink";
@ -43,6 +43,7 @@ export class KpiCapacity extends EntityBase {
KpiCapacityDetails: KpiCapacityDetail[];
@ManyToMany(() => KpiLink, (kpiLink) => kpiLink.kpiCapacitys)
@JoinTable()
kpiLinks: KpiLink[];
}
export class createKpiCapacity {