hrms-api-org/src/entities/StateOperatorUser.ts

51 lines
1.1 KiB
TypeScript
Raw Normal View History

2024-10-09 14:14:36 +07:00
import { Entity, Column, ManyToOne, JoinColumn, OneToMany } from "typeorm";
import { EntityBase } from "./base/Base";
import { StateOperator } from "./StateOperator";
import { Workflow } from "./Workflow";
@Entity("stateOperatorUser")
export class StateOperatorUser extends EntityBase {
@Column({
nullable: true,
2024-10-09 16:20:43 +07:00
comment: "ผู้ดำเนินการ",
2024-10-09 14:14:36 +07:00
length: 255,
default: null,
})
2024-10-09 16:20:43 +07:00
operator: string;
2024-10-09 14:14:36 +07:00
@Column({
nullable: true,
comment: "",
length: 255,
default: null,
})
2024-10-09 16:20:43 +07:00
profile: string;
2024-10-09 14:14:36 +07:00
@Column({
nullable: true,
comment: "ลำดับ",
default: null,
})
2024-10-09 16:20:43 +07:00
order: number;
@Column({
nullable: true,
comment: "ผู้ดำเนินการ",
length: 255,
default: null,
})
refId: string;
2024-10-09 14:14:36 +07:00
@Column({
nullable: true,
length: 40,
2024-10-09 16:20:43 +07:00
comment: "คีย์นอก(FK)ของตาราง workflow",
2024-10-09 14:14:36 +07:00
default: null,
})
2024-10-09 16:20:43 +07:00
workflowId: string;
2024-10-09 14:14:36 +07:00
2024-10-09 16:20:43 +07:00
@ManyToOne(() => Workflow, (workflow) => workflow.stateOperatorUsers)
@JoinColumn({ name: "workflowId" })
workflow: Workflow;
2024-10-09 14:14:36 +07:00
}