เพิ่มlink relation

This commit is contained in:
Kittapath 2024-01-31 14:29:39 +07:00
parent a41e33c0d4
commit d74c3140fa
16 changed files with 416 additions and 139 deletions

View file

@ -4,6 +4,7 @@ import { OrgRoot } from "./OrgRoot";
import { OrgChild1 } from "./OrgChild1";
import { OrgChild2 } from "./OrgChild2";
import { OrgChild3 } from "./OrgChild3";
import { OrgRevision } from "./OrgRevision";
// ENUM orgChild4Rank
enum OrgChild4Rank {
DEPARTMENT = "DEPARTMENT",
@ -116,6 +117,22 @@ export class OrgChild4 extends EntityBase {
})
isAncestorDNA: string;
@ManyToOne(() => OrgRevision, (orgRevision) => orgRevision.orgChild4s)
@JoinColumn({ name: "orgRevisionId" })
orgRevision: OrgRevision;
@ManyToOne(() => OrgRoot, (orgRoot) => orgRoot.orgChild4s)
@JoinColumn({ name: "orgRootId" })
orgRoot: OrgRoot;
@ManyToOne(() => OrgChild1, (orgChild1) => orgChild1.orgChild4s)
@JoinColumn({ name: "orgChild1Id" })
orgChild1: OrgChild1;
@ManyToOne(() => OrgChild2, (orgChild2) => orgChild2.orgChild4s)
@JoinColumn({ name: "orgChild2Id" })
orgChild2: OrgChild2;
@ManyToOne(() => OrgChild3, (orgChild3) => orgChild3.orgChild4s)
@JoinColumn({ name: "orgChild3Id" })
orgChild3: OrgChild3;