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

43 lines
970 B
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,
comment: "",
length: 255,
default: null,
})
profile: string;
@Column({
nullable: true,
comment: "",
length: 255,
default: null,
})
type: string; //commander
@Column({
nullable: true,
comment: "ลำดับ",
default: null,
})
order: number; //
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง stateOperator",
default: null,
})
stateOperatorId: string;
@ManyToOne(() => StateOperator, (stateOperator) => stateOperator.stateOperatorUsers)
@JoinColumn({ name: "stateOperatorId" })
stateOperator: StateOperator;
}