relation posMaster to Root and Child1-4

This commit is contained in:
AdisakKanthawilang 2024-01-31 15:31:20 +07:00
parent afc97292d3
commit 8cb8b449b4
6 changed files with 47 additions and 2 deletions

View file

@ -5,6 +5,7 @@ import { OrgRevision } from "./OrgRevision";
import { OrgChild2 } from "./OrgChild2";
import { OrgChild3 } from "./OrgChild3";
import { OrgChild4 } from "./OrgChild4";
import { PosMaster } from "./PosMaster";
// ENUM orgRootRank
enum OrgRootRank {
@ -92,6 +93,9 @@ export class OrgRoot extends EntityBase {
@JoinColumn({ name: "orgRevisionId" })
orgRevision: OrgRevision;
@OneToMany(() => PosMaster, (posMaster) => posMaster.orgRoot)
posMasters: PosMaster[];
@OneToMany(() => OrgChild1, (orgChild1) => orgChild1.orgRoot)
orgChild1s: OrgChild1[];