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";
|
|
|
|
|
|
|
|
|
|
@Entity("workflow")
|
|
|
|
|
export class Workflow extends EntityBase {
|
|
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
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
|
|
|
|
|
|
|
|
@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-08 22:07:04 +07:00
|
|
|
}
|