migrate workflow
This commit is contained in:
parent
2e406b14ab
commit
2af5598aae
3 changed files with 172 additions and 0 deletions
74
src/entities/MetaStateOperator.ts
Normal file
74
src/entities/MetaStateOperator.ts
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn, OneToMany } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { MetaState } from "./MetaState";
|
||||
|
||||
@Entity("metaStateOperator")
|
||||
export class MetaStateOperator extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ผู้ดำเนินการ",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
operator: string;
|
||||
|
||||
@Column({
|
||||
comment: "ดูเอกสาร",
|
||||
default: false,
|
||||
})
|
||||
canView: boolean;
|
||||
|
||||
@Column({
|
||||
comment: "แก้ไขเอกสาร",
|
||||
default: false,
|
||||
})
|
||||
canUpdate: boolean;
|
||||
|
||||
@Column({
|
||||
comment: "ลบเอกสาร",
|
||||
default: false,
|
||||
})
|
||||
canDelete: boolean;
|
||||
|
||||
@Column({
|
||||
comment: "ยกเลิกเอกสาร",
|
||||
default: false,
|
||||
})
|
||||
canCancel: boolean;
|
||||
|
||||
@Column({
|
||||
comment: "ดำเนินการเอกสาร",
|
||||
default: false,
|
||||
})
|
||||
canOperate: boolean;
|
||||
|
||||
@Column({
|
||||
comment: "เปลี่ยนสถานะเอกสาร",
|
||||
default: false,
|
||||
})
|
||||
canChangeState: boolean;
|
||||
|
||||
@Column({
|
||||
comment: "แสดงความเห็นเอกสาร",
|
||||
default: false,
|
||||
})
|
||||
canComment: boolean;
|
||||
|
||||
@Column({
|
||||
comment: "ลงนามอนุมัติ",
|
||||
default: false,
|
||||
})
|
||||
canSign: boolean;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง metaState",
|
||||
default: null,
|
||||
})
|
||||
metaStateId: string;
|
||||
|
||||
@ManyToOne(() => MetaState, (metaState) => metaState.metaStateOperators)
|
||||
@JoinColumn({ name: "metaStateId" })
|
||||
metaState: MetaState;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue