er ฝั่ง user

This commit is contained in:
Kittapath 2024-04-22 15:50:04 +07:00
parent 27da57f35e
commit fae8d38013
16 changed files with 870 additions and 72 deletions

View file

@ -1,7 +1,7 @@
import { Entity, Column, OneToMany, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { KpiLink } from "./kpiLink";
import { KpiPeriod } from "./kpiPeriod";
import { KpiUserRole } from "./kpiUserRole";
@Entity("kpiRole")
export class KpiRole extends EntityBase {
@ -219,6 +219,9 @@ export class KpiRole extends EntityBase {
@ManyToOne(() => KpiPeriod, (kpiPeriod) => kpiPeriod.kpiRoles)
@JoinColumn({ name: "kpiPeriodId" })
kpiPeriod: KpiPeriod;
@OneToMany(() => KpiUserRole, (kpiUserRole) => kpiUserRole.kpiRoles)
kpiUserRoles: KpiUserRole[];
}
export class createKpiRole {
@Column()