เพิ่มlink relation
This commit is contained in:
parent
a41e33c0d4
commit
d74c3140fa
16 changed files with 416 additions and 139 deletions
|
|
@ -1,19 +1,27 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn, OneToOne, OneToMany } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { Position } from "./Position";
|
||||
import { PosDict } from "./PosDict";
|
||||
|
||||
@Entity("posExecutive")
|
||||
export class PosExecutive extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ชื่อตำแหน่งทางการบริหาร",
|
||||
length: 255,
|
||||
default: "string",
|
||||
})
|
||||
posExecutiveName: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ลำดับความสำคัญ",
|
||||
})
|
||||
posExecutivePriority: number;
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ชื่อตำแหน่งทางการบริหาร",
|
||||
length: 255,
|
||||
default: "string",
|
||||
})
|
||||
posExecutiveName: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ลำดับความสำคัญ",
|
||||
})
|
||||
posExecutivePriority: number;
|
||||
|
||||
@OneToMany(() => Position, (position) => position.posExecutive)
|
||||
positions: Position[];
|
||||
|
||||
@OneToMany(() => PosDict, (posDict) => posDict.posExecutive)
|
||||
posDicts: PosDict[];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue