เพิ่ม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, PrimaryGeneratedColum
|
|||
import { EntityBase } from "./base/Base";
|
||||
import { OrgRoot } from "./OrgRoot";
|
||||
import { OrgChild2 } from "./OrgChild2";
|
||||
import { OrgRevision } from "./OrgRevision";
|
||||
import { OrgChild3 } from "./OrgChild3";
|
||||
import { OrgChild4 } from "./OrgChild4";
|
||||
|
||||
enum OrgChild1Rank {
|
||||
DEPARTMENT = "DEPARTMENT",
|
||||
|
|
@ -89,12 +92,22 @@ export class OrgChild1 extends EntityBase {
|
|||
})
|
||||
isAncestorDNA: string;
|
||||
|
||||
@ManyToOne(() => OrgRevision, (orgRevision) => orgRevision.orgChild1s)
|
||||
@JoinColumn({ name: "orgRevisionId" })
|
||||
orgRevision: OrgRevision;
|
||||
|
||||
@ManyToOne(() => OrgRoot, (orgRoot) => orgRoot.orgChild1s)
|
||||
@JoinColumn({ name: "orgRootId" })
|
||||
orgRoot: OrgRoot;
|
||||
|
||||
@OneToMany(() => OrgChild2, (orgChild2) => orgChild2.orgChild1)
|
||||
orgChild2s: OrgChild2[];
|
||||
|
||||
@OneToMany(() => OrgChild3, (orgChild3) => orgChild3.orgChild1)
|
||||
orgChild3s: OrgChild3[];
|
||||
|
||||
@OneToMany(() => OrgChild4, (orgChild4) => orgChild4.orgChild1)
|
||||
orgChild4s: OrgChild4[];
|
||||
}
|
||||
|
||||
export class CreateOrgChild1 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue