เพิ่มlink relation
This commit is contained in:
parent
a41e33c0d4
commit
d74c3140fa
16 changed files with 416 additions and 139 deletions
|
|
@ -2,6 +2,9 @@ import { Entity, Column, ManyToOne, JoinColumn, OneToMany } from "typeorm";
|
|||
import { EntityBase } from "./base/Base";
|
||||
import { OrgChild2 } from "./OrgChild2";
|
||||
import { OrgChild4 } from "./OrgChild4";
|
||||
import { OrgRevision } from "./OrgRevision";
|
||||
import { OrgChild1 } from "./OrgChild1";
|
||||
import { OrgRoot } from "./OrgRoot";
|
||||
|
||||
enum OrgChild3Rank {
|
||||
DEPARTMENT = "DEPARTMENT",
|
||||
|
|
@ -101,6 +104,18 @@ export class OrgChild3 extends EntityBase {
|
|||
})
|
||||
isAncestorDNA: string;
|
||||
|
||||
@ManyToOne(() => OrgRevision, (orgRevision) => orgRevision.orgChild3s)
|
||||
@JoinColumn({ name: "orgRevisionId" })
|
||||
orgRevision: OrgRevision;
|
||||
|
||||
@ManyToOne(() => OrgRoot, (orgRoot) => orgRoot.orgChild3s)
|
||||
@JoinColumn({ name: "orgRootId" })
|
||||
orgRoot: OrgRoot;
|
||||
|
||||
@ManyToOne(() => OrgChild1, (orgChild1) => orgChild1.orgChild3s)
|
||||
@JoinColumn({ name: "orgChild1Id" })
|
||||
orgChild1: OrgChild1;
|
||||
|
||||
@ManyToOne(() => OrgChild2, (orgChild2) => orgChild2.orgChild3s)
|
||||
@JoinColumn({ name: "orgChild2Id" })
|
||||
orgChild2: OrgChild2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue