2024-10-09 12:53:13 +07:00
|
|
|
import { Entity, Column, OneToMany } from "typeorm";
|
2024-10-08 22:07:04 +07:00
|
|
|
import { EntityBase } from "./base/Base";
|
|
|
|
|
import { State } from "./State";
|
2024-10-09 16:20:43 +07:00
|
|
|
import { StateOperatorUser } from "./StateOperatorUser";
|
2024-10-08 22:07:04 +07:00
|
|
|
|
|
|
|
|
@Entity("workflow")
|
|
|
|
|
export class Workflow extends EntityBase {
|
|
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
2024-10-16 12:00:22 +07:00
|
|
|
comment: "refIdw",
|
|
|
|
|
length: 255,
|
|
|
|
|
default: null,
|
|
|
|
|
})
|
|
|
|
|
refId: string;
|
|
|
|
|
|
|
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
2024-11-19 10:43:25 +07:00
|
|
|
comment: "ผู้ใช้งาน",
|
|
|
|
|
length: 255,
|
|
|
|
|
default: null,
|
|
|
|
|
})
|
|
|
|
|
profileType: string;
|
|
|
|
|
|
|
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
2024-10-08 22:07:04 +07:00
|
|
|
comment: "ชื่อ flow",
|
|
|
|
|
length: 255,
|
|
|
|
|
default: null,
|
|
|
|
|
})
|
|
|
|
|
name: string;
|
|
|
|
|
|
|
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
2024-10-09 12:53:13 +07:00
|
|
|
comment: "ระบบ", //PLACEMENT
|
2024-10-08 22:07:04 +07:00
|
|
|
length: 255,
|
|
|
|
|
default: null,
|
|
|
|
|
})
|
|
|
|
|
category: string;
|
|
|
|
|
|
2024-10-09 10:05:39 +07:00
|
|
|
@OneToMany(() => State, (state) => state.workflow)
|
|
|
|
|
states: State[];
|
|
|
|
|
|
2024-10-08 22:07:04 +07:00
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
2024-10-09 12:53:13 +07:00
|
|
|
comment: "ชื่อระบบ", //สอบคัดเลือก
|
2024-10-09 10:05:39 +07:00
|
|
|
length: 100,
|
2024-10-08 22:07:04 +07:00
|
|
|
default: null,
|
|
|
|
|
})
|
2024-10-09 12:53:13 +07:00
|
|
|
sysName: string;
|
2024-10-08 22:07:04 +07:00
|
|
|
|
|
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
2024-10-09 10:05:39 +07:00
|
|
|
comment: "ชื่อระดับ",
|
|
|
|
|
length: 100,
|
2024-10-08 22:07:04 +07:00
|
|
|
default: null,
|
|
|
|
|
})
|
2024-10-09 10:05:39 +07:00
|
|
|
posLevelName: string;
|
2024-10-08 22:07:04 +07:00
|
|
|
|
2024-10-16 11:55:45 +07:00
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
comment: "id state",
|
|
|
|
|
length: 100,
|
|
|
|
|
default: null,
|
|
|
|
|
})
|
|
|
|
|
stateId: string;
|
|
|
|
|
|
2024-10-08 22:07:04 +07:00
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
2024-10-09 10:05:39 +07:00
|
|
|
comment: "ชื่อประเภท",
|
|
|
|
|
length: 100,
|
2024-10-08 22:07:04 +07:00
|
|
|
default: null,
|
|
|
|
|
})
|
2024-10-09 10:05:39 +07:00
|
|
|
posTypeName: string;
|
2024-10-09 16:20:43 +07:00
|
|
|
|
|
|
|
|
@OneToMany(() => StateOperatorUser, (stateOperatorUser) => stateOperatorUser.workflow)
|
|
|
|
|
stateOperatorUsers: StateOperatorUser[];
|
2024-10-08 22:07:04 +07:00
|
|
|
}
|