แก้ db workflow

This commit is contained in:
kittapath 2024-10-09 10:05:39 +07:00
parent 7e6fdcb15e
commit 87b6fdf0d2
5 changed files with 83 additions and 53 deletions

View file

@ -77,8 +77,8 @@ export class CommandSys {
@OneToMany(() => Assign, (assgin) => assgin.commandAssignSys)
assgins: Assign[];
@OneToMany(() => Workflow, (workflow) => workflow.commandSys)
workflows: Workflow[];
// @OneToMany(() => Workflow, (workflow) => workflow.commandSys)
// workflows: Workflow[];
}
export class CreateCommandSys {

View file

@ -58,8 +58,8 @@ export class PosLevel extends EntityBase {
@OneToMany(() => Profile, (profile) => profile.posLevel)
profiles: Profile[];
@OneToMany(() => Workflow, (workflow) => workflow.posLevel)
workflows: Workflow[];
// @OneToMany(() => Workflow, (workflow) => workflow.posLevel)
// workflows: Workflow[];
}
export class CreatePosLevel {

View file

@ -36,8 +36,8 @@ export class PosType extends EntityBase {
@OneToMany(() => Profile, (profile) => profile.posType)
profiles: Profile[];
@OneToMany(() => Workflow, (workflow) => workflow.posType)
workflows: Workflow[];
// @OneToMany(() => Workflow, (workflow) => workflow.posType)
// workflows: Workflow[];
}
export class CreatePosType {

View file

@ -23,66 +23,66 @@ export class Workflow extends EntityBase {
})
category: string;
// @Column({
// nullable: true,
// comment: "กรุ๊ปเลือด",
// length: 255,
// default: null,
// })
// rank: string;
// @Column({
// nullable: true,
// comment: "กรุ๊ปเลือด",
// length: 255,
// default: null,
// })
// executive: string;
// @Column({
// nullable: true,
// comment: "หมวดหมู่ระบบ",
// length: 255,
// default: null,
// })
// system: string;
@OneToMany(() => State, (state) => state.workflow)
states: State[];
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง commandSys",
default: null,
})
commandSysId: string;
// @Column({
// nullable: true,
// length: 40,
// comment: "คีย์นอก(FK)ของตาราง commandSys",
// default: null,
// })
// commandSysId: string;
@ManyToOne(() => CommandSys, (commandSys) => commandSys.workflows)
@JoinColumn({ name: "commandSysId" })
commandSys: CommandSys;
// @ManyToOne(() => CommandSys, (commandSys) => commandSys.workflows)
// @JoinColumn({ name: "commandSysId" })
// commandSys: CommandSys;
// @Column({
// nullable: true,
// length: 40,
// comment: "คีย์นอก(FK)ของตาราง posLevel",
// default: null,
// })
// posLevelId: string;
// @ManyToOne(() => PosLevel, (posLevel) => posLevel.workflows)
// @JoinColumn({ name: "posLevelId" })
// posLevel: PosLevel;
// @Column({
// nullable: true,
// length: 40,
// comment: "คีย์นอก(FK)ของตาราง posType",
// default: null,
// })
// posTypeId: string;
// @ManyToOne(() => PosType, (posType) => posType.workflows)
// @JoinColumn({ name: "posTypeId" })
// posType: PosType;
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง posLevel",
comment: "ชื่อระบบ",
length: 100,
default: null,
})
posLevelId: string;
@ManyToOne(() => PosLevel, (posLevel) => posLevel.workflows)
@JoinColumn({ name: "posLevelId" })
posLevel: PosLevel;
commandSysName: string;
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง posType",
comment: "ชื่อระดับ",
length: 100,
default: null,
})
posTypeId: string;
posLevelName: string;
@ManyToOne(() => PosType, (posType) => posType.workflows)
@JoinColumn({ name: "posTypeId" })
posType: PosType;
@Column({
nullable: true,
comment: "ชื่อประเภท",
length: 100,
default: null,
})
posTypeName: string;
}