เพิ่มlink relation
This commit is contained in:
parent
a41e33c0d4
commit
d74c3140fa
16 changed files with 416 additions and 139 deletions
|
|
@ -1,6 +1,8 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn, OneToOne, OneToMany } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { PosType } from "./PosType";
|
||||
import { Position } from "./Position";
|
||||
import { PosDict } from "./PosDict";
|
||||
// ENUM PosLevelAuthority
|
||||
enum PosLevelAuthority {
|
||||
HEAD = "HEAD",
|
||||
|
|
@ -43,4 +45,9 @@ export class PosLevel extends EntityBase {
|
|||
@JoinColumn({ name: "posTypeId" })
|
||||
posType: PosType;
|
||||
|
||||
@OneToMany(() => Position, (position) => position.posLevel)
|
||||
positions: Position[];
|
||||
|
||||
@OneToMany(() => PosDict, (posDict) => posDict.posLevel)
|
||||
posDicts: PosDict[];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue