no message

This commit is contained in:
kittapath 2024-10-16 11:55:45 +07:00
parent ad97270752
commit 3ea2c7c3b0
9 changed files with 420 additions and 35 deletions

View file

@ -2,6 +2,7 @@ import { Entity, Column, ManyToOne, JoinColumn, OneToMany } from "typeorm";
import { EntityBase } from "./base/Base";
import { StateOperator } from "./StateOperator";
import { Workflow } from "./Workflow";
import { Profile } from "./Profile";
@Entity("stateOperatorUser")
export class StateOperatorUser extends EntityBase {
@ -13,14 +14,6 @@ export class StateOperatorUser extends EntityBase {
})
operator: string;
@Column({
nullable: true,
comment: "",
length: 255,
default: null,
})
profile: string;
@Column({
nullable: true,
comment: "ลำดับ",
@ -47,4 +40,17 @@ export class StateOperatorUser extends EntityBase {
@ManyToOne(() => Workflow, (workflow) => workflow.stateOperatorUsers)
@JoinColumn({ name: "workflowId" })
workflow: Workflow;
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง profile",
type: "uuid",
default: null,
})
profileId: string;
@ManyToOne(() => Profile, (profile) => profile.stateOperatorUsers)
@JoinColumn({ name: "profileId" })
profile: Profile;
}