yao/xiang/models/workflow.mod.json
2021-11-27 08:51:27 +08:00

133 lines
3.3 KiB
JSON

{
"name": "工作流",
"table": {
"name": "xiang_workflow",
"comment": "工作流数据表",
"engine": "InnoDB"
},
"columns": [
{ "label": "ID", "name": "id", "type": "ID" },
{
"label": "名称",
"comment": "工作流名称",
"name": "name",
"type": "string",
"length": 255,
"index": true,
"validations": [
{
"method": "typeof",
"args": ["string"],
"message": "{{input}}类型错误, {{label}}应该为字符串"
}
]
},
{
"label": "数据标识",
"comment": "关联数据标识, 关联数据模型表格ID",
"name": "data_id",
"type": "bigInteger",
"index": true,
"nullable": true
},
{
"label": "节点",
"comment": "当前节点名称",
"name": "node_name",
"type": "string",
"length": 255,
"index": true,
"nullable": true
},
{
"label": "节点状态",
"comment": "当前节点状态",
"name": "node_status",
"type": "enum",
"default": "未开始",
"option": ["未开始", "进行中", "已完成"],
"index": true,
"validations": [
{
"method": "typeof",
"args": ["string"],
"message": "{{input}}类型错误, {{label}}应该为字符串"
},
{
"method": "enum",
"args": ["未开始", "进行中", "已完成"],
"message": "{{input}}不在许可范围, {{label}}应该为 未开始/进行中/已完成"
}
]
},
{
"label": "当前处理人",
"comment": "当前处理人",
"name": "user_id",
"type": "bigInteger",
"index": true,
"nullable": true
},
{
"label": "处理人IDs",
"comment": "相关处理人ID列表(用于检索)",
"name": "user_ids",
"type": "string",
"length": 255,
"index": true,
"nullable": true
},
{
"label": "处理人",
"comment": "相关处理人",
"name": "users",
"type": "json",
"nullable": true
},
{
"label": "数据",
"comment": "各节点输入数据(Key-Value)",
"name": "input",
"type": "json",
"nullable": true
},
{
"label": "处理结果",
"comment": "各节点处理结果(Key-Value)",
"name": "output",
"type": "json",
"nullable": true
},
{
"label": "操作记录",
"comment": "操作记录",
"name": "history",
"type": "json",
"nullable": true
},
{
"label": "状态",
"comment": "流程状态",
"name": "status",
"type": "enum",
"default": "未开始",
"option": ["未开始", "进行中", "已完成", "已关闭"],
"index": true,
"validations": [
{
"method": "typeof",
"args": ["string"],
"message": "{{input}}类型错误, {{label}}应该为字符串"
},
{
"method": "enum",
"args": ["未开始", "进行中", "已完成", "已关闭"],
"message": "{{input}}不在许可范围, {{label}}应该为 未开始/进行中/已完成/已关闭"
}
]
}
],
"indexes": [],
"option": { "timestamps": true, "soft_deletes": true }
}