no message

This commit is contained in:
kittapath 2024-10-09 16:20:43 +07:00
parent 428ed28b64
commit 7b83f91d73
7 changed files with 185 additions and 36 deletions

View file

@ -72,7 +72,4 @@ export class StateOperator extends EntityBase {
@ManyToOne(() => State, (state) => state.stateOperators)
@JoinColumn({ name: "stateId" })
state: State;
@OneToMany(() => StateOperatorUser, (stateOperatorUser) => stateOperatorUser.stateOperator)
stateOperatorUsers: StateOperatorUser[];
}

View file

@ -5,6 +5,14 @@ import { Workflow } from "./Workflow";
@Entity("stateOperatorUser")
export class StateOperatorUser extends EntityBase {
@Column({
nullable: true,
comment: "ผู้ดำเนินการ",
length: 255,
default: null,
})
operator: string;
@Column({
nullable: true,
comment: "",
@ -13,30 +21,30 @@ export class StateOperatorUser extends EntityBase {
})
profile: string;
@Column({
nullable: true,
comment: "",
length: 255,
default: null,
})
type: string; //commander
@Column({
nullable: true,
comment: "ลำดับ",
default: null,
})
order: number; //
order: number;
@Column({
nullable: true,
comment: "ผู้ดำเนินการ",
length: 255,
default: null,
})
refId: string;
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง stateOperator",
comment: "คีย์นอก(FK)ของตาราง workflow",
default: null,
})
stateOperatorId: string;
workflowId: string;
@ManyToOne(() => StateOperator, (stateOperator) => stateOperator.stateOperatorUsers)
@JoinColumn({ name: "stateOperatorId" })
stateOperator: StateOperator;
@ManyToOne(() => Workflow, (workflow) => workflow.stateOperatorUsers)
@JoinColumn({ name: "workflowId" })
workflow: Workflow;
}

View file

@ -1,6 +1,7 @@
import { Entity, Column, OneToMany } from "typeorm";
import { EntityBase } from "./base/Base";
import { State } from "./State";
import { StateOperatorUser } from "./StateOperatorUser";
@Entity("workflow")
export class Workflow extends EntityBase {
@ -46,4 +47,7 @@ export class Workflow extends EntityBase {
default: null,
})
posTypeName: string;
@OneToMany(() => StateOperatorUser, (stateOperatorUser) => stateOperatorUser.workflow)
stateOperatorUsers: StateOperatorUser[];
}