เพิ่ม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

@ -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[];
}