fix OrgController

This commit is contained in:
AdisakKanthawilang 2024-01-26 15:54:07 +07:00
parent 22324853db
commit e05d4f8d8e
10 changed files with 58 additions and 90 deletions

View file

@ -1,5 +1,6 @@
import { Entity, Column, ManyToOne, JoinColumn, OneToOne } from "typeorm";
import { Entity, Column, ManyToOne, JoinColumn, OneToOne, OneToMany } from "typeorm";
import { EntityBase } from "./base/Base";
import { OrgRoot } from "./OrgRoot";
@Entity("orgRevision")
export class OrgRevision extends EntityBase {
@ -38,7 +39,9 @@ export class OrgRevision extends EntityBase {
})
orgRevisionIsDraft: boolean;
@OneToMany(() => OrgRoot, (orgRoot) => orgRoot.orgRevision)
orgRoots: OrgRoot[];
}
export type UpdateOrgRevision = Partial<OrgRevision>;