import { Entity, Column, OneToMany } from "typeorm";
import { EntityBase } from "./base/Base";
import { MetaState } from "./MetaState";

@Entity("metaWorkflow")
export class MetaWorkflow extends EntityBase {
  @Column({
    nullable: true,
    comment: "ชื่อ flow",
    length: 255,
    default: null,
  })
  name: string;

  @Column({
    nullable: true,
    comment: "ระบบ", //PLACEMENT
    length: 255,
    default: null,
  })
  category: string;

  @OneToMany(() => MetaState, (metaState) => metaState.metaWorkflow)
  metaStates: MetaState[];

  @Column({
    nullable: true,
    comment: "ชื่อระบบ", //สอบคัดเลือก
    length: 100,
    default: null,
  })
  sysName: string;

  @Column({
    nullable: true,
    comment: "ชื่อระดับ",
    length: 100,
    default: null,
  })
  posLevelName: string;

  @Column({
    nullable: true,
    comment: "ชื่อประเภท",
    length: 100,
    default: null,
  })
  posTypeName: string;

  //   @OneToMany(() => metaStateOperatorUser, (metaStateOperatorUser) => metaStateOperatorUser.metaWorkflow)
  //   metaStateOperatorUsers: metaStateOperatorUser[];
}
