api รักษาการแทน

This commit is contained in:
Kittapath 2024-06-19 23:03:54 +07:00
parent f7c553ec1d
commit 9de005c7ae
8 changed files with 752 additions and 69 deletions

View file

@ -10,6 +10,7 @@ import { OrgChild3 } from "./OrgChild3";
import { OrgChild4 } from "./OrgChild4";
import { Profile } from "./Profile";
import { AuthRole } from "./AuthRole";
import { PosMasterAct } from "./PosMasterAct";
enum PosMasterLine {
MAIN = "MAIN",
@ -217,6 +218,12 @@ export class PosMaster extends EntityBase {
@OneToMany(() => Position, (position) => position.posMaster)
positions: Position[];
@OneToMany(() => PosMasterAct, (posMasterAct) => posMasterAct.posMaster)
posMasterActs: PosMasterAct[];
@OneToMany(() => PosMasterAct, (posMasterAct) => posMasterAct.posMasterChild)
posMasterActChilds: PosMasterAct[];
}
export class CreatePosMaster {

View file

@ -0,0 +1,44 @@
import { Entity, Column, ManyToOne, JoinColumn, OneToOne, OneToMany, ManyToMany } from "typeorm";
import { EntityBase } from "./base/Base";
import { PosMaster } from "./PosMaster";
@Entity("posMasterAct")
export class PosMasterAct extends EntityBase {
@Column({
nullable: true,
comment: "ลำดับที่แสดงผล",
default: null,
})
posMasterOrder: number;
@Column({
nullable: true,
default: null,
length: 40,
comment: "คีย์นอก(FK)ของตาราง posMaster",
})
posMasterId: string;
@ManyToOne(() => PosMaster, (posMaster) => posMaster.posMasterActs)
@JoinColumn({ name: "posMasterId" })
posMaster: PosMaster;
@Column({
nullable: true,
default: null,
length: 40,
comment: "คีย์นอก(FK)ของตาราง posMasterChild",
})
posMasterChildId: string;
@ManyToOne(() => PosMaster, (posMaster) => posMaster.posMasterActChilds)
@JoinColumn({ name: "posMasterChildId" })
posMasterChild: PosMaster;
}
export class CreatePosMaster {
@Column()
posMasterNoPrefix: string;
}
export type UpdatePosMaster = Partial<PosMaster>;