diff --git a/models/approval_instance.json b/models/approval_instance.json index c2ecea0..dd50b59 100644 --- a/models/approval_instance.json +++ b/models/approval_instance.json @@ -1,27 +1,114 @@ { "table_name": "approval_instance", "fields": [ - {"name": "id", "type": "varchar(32)", "not_null": true, "comment": "主键ID"}, - {"name": "workflow_id", "type": "varchar(32)", "not_null": true, "comment": "工作流ID"}, - {"name": "business_type", "type": "varchar(50)", "not_null": true, "comment": "业务类型: contract/customer/opportunity"}, - {"name": "business_id", "type": "varchar(64)", "not_null": true, "comment": "业务记录ID"}, - {"name": "current_step", "type": "int", "comment": "当前步骤号"}, - {"name": "status", "type": "varchar(20)", "comment": "状态: pending/approved/rejected/cancelled"}, - {"name": "initiator_id", "type": "varchar(32)", "comment": "发起人ID"}, - {"name": "org_id", "type": "varchar(32)", "comment": "组织ID"}, - {"name": "initiated_at", "type": "timestamp", "comment": "发起时间"}, - {"name": "completed_at", "type": "timestamp", "comment": "完成时间"} + { + "name": "id", + "type": "varchar(32)", + "not_null": true, + "comment": "主键ID" + }, + { + "name": "workflow_id", + "type": "varchar(32)", + "not_null": true, + "comment": "工作流ID" + }, + { + "name": "business_type", + "type": "varchar(50)", + "not_null": true, + "comment": "业务类型: contract/customer/opportunity" + }, + { + "name": "business_id", + "type": "varchar(64)", + "not_null": true, + "comment": "业务记录ID" + }, + { + "name": "current_step", + "type": "int", + "comment": "当前步骤号" + }, + { + "name": "status", + "type": "varchar(20)", + "comment": "状态: pending/approved/rejected/cancelled" + }, + { + "name": "initiator_id", + "type": "varchar(32)", + "comment": "发起人ID" + }, + { + "name": "org_id", + "type": "varchar(32)", + "comment": "组织ID" + }, + { + "name": "initiated_at", + "type": "timestamp", + "comment": "发起时间" + }, + { + "name": "completed_at", + "type": "timestamp", + "comment": "完成时间" + } ], "indexes": [ - {"name": "idx_instance_workflow", "fields": ["workflow_id"], "type": "normal"}, - {"name": "idx_instance_business", "fields": ["business_type", "business_id"], "type": "normal", "comment": "复合索引:按业务类型和记录查询"}, - {"name": "idx_instance_status", "fields": ["status"], "type": "normal"}, - {"name": "idx_instance_initiator", "fields": ["initiator_id"], "type": "normal"} + { + "name": "idx_instance_workflow", + "fields": [ + "workflow_id" + ], + "type": "normal" + }, + { + "name": "idx_instance_business", + "fields": [ + "business_type", + "business_id" + ], + "type": "normal", + "comment": "复合索引:按业务类型和记录查询" + }, + { + "name": "idx_instance_status", + "fields": [ + "status" + ], + "type": "normal" + }, + { + "name": "idx_instance_initiator", + "fields": [ + "initiator_id" + ], + "type": "normal" + } ], "codes": [ - {"key": "pending", "name": "审批中"}, - {"key": "approved", "name": "已通过"}, - {"key": "rejected", "name": "已驳回"}, - {"key": "cancelled", "name": "已取消"} - ] + { + "key": "pending", + "name": "审批中" + }, + { + "key": "approved", + "name": "已通过" + }, + { + "key": "rejected", + "name": "已驳回" + }, + { + "key": "cancelled", + "name": "已取消" + } + ], + "summary": { + "tablename": "approval_instance", + "label": "审批实例", + "comment": "审批流程实例记录" + } } \ No newline at end of file diff --git a/models/approval_step.json b/models/approval_step.json index bf13b67..9da8239 100644 --- a/models/approval_step.json +++ b/models/approval_step.json @@ -1,21 +1,82 @@ { "table_name": "approval_step", "fields": [ - {"name": "id", "type": "varchar(32)", "not_null": true, "comment": "主键ID"}, - {"name": "workflow_id", "type": "varchar(32)", "not_null": true, "comment": "所属工作流ID"}, - {"name": "step_name", "type": "varchar(100)", "not_null": true, "comment": "步骤名称"}, - {"name": "step_number", "type": "int", "not_null": true, "comment": "步骤顺序号"}, - {"name": "approver_role", "type": "varchar(20)", "comment": "审批角色: role/user"}, - {"name": "approver_id", "type": "varchar(32)", "comment": "审批人ID"}, - {"name": "description", "type": "varchar(500)", "comment": "步骤描述"}, - {"name": "timeout_hours", "type": "int", "comment": "超时小时数"} + { + "name": "id", + "type": "varchar(32)", + "not_null": true, + "comment": "主键ID" + }, + { + "name": "workflow_id", + "type": "varchar(32)", + "not_null": true, + "comment": "所属工作流ID" + }, + { + "name": "step_name", + "type": "varchar(100)", + "not_null": true, + "comment": "步骤名称" + }, + { + "name": "step_number", + "type": "int", + "not_null": true, + "comment": "步骤顺序号" + }, + { + "name": "approver_role", + "type": "varchar(20)", + "comment": "审批角色: role/user" + }, + { + "name": "approver_id", + "type": "varchar(32)", + "comment": "审批人ID" + }, + { + "name": "description", + "type": "varchar(500)", + "comment": "步骤描述" + }, + { + "name": "timeout_hours", + "type": "int", + "comment": "超时小时数" + } ], "indexes": [ - {"name": "idx_step_workflow", "fields": ["workflow_id"], "type": "normal"}, - {"name": "idx_step_order", "fields": ["workflow_id", "step_number"], "type": "normal", "comment": "复合索引:按工作流和顺序查询"} + { + "name": "idx_step_workflow", + "fields": [ + "workflow_id" + ], + "type": "normal" + }, + { + "name": "idx_step_order", + "fields": [ + "workflow_id", + "step_number" + ], + "type": "normal", + "comment": "复合索引:按工作流和顺序查询" + } ], "codes": [ - {"key": "role", "name": "角色审批"}, - {"key": "user", "name": "指定人审批"} - ] + { + "key": "role", + "name": "角色审批" + }, + { + "key": "user", + "name": "指定人审批" + } + ], + "summary": { + "tablename": "approval_step", + "label": "审批步骤", + "comment": "工作流中的审批步骤定义" + } } \ No newline at end of file diff --git a/models/approval_task.json b/models/approval_task.json index d7d6023..1f50ff8 100644 --- a/models/approval_task.json +++ b/models/approval_task.json @@ -1,24 +1,95 @@ { "table_name": "approval_task", "fields": [ - {"name": "id", "type": "varchar(32)", "not_null": true, "comment": "主键ID"}, - {"name": "instance_id", "type": "varchar(32)", "not_null": true, "comment": "所属实例ID"}, - {"name": "step_id", "type": "varchar(32)", "not_null": true, "comment": "审批步骤ID"}, - {"name": "assignee_id", "type": "varchar(32)", "comment": "审批人ID"}, - {"name": "status", "type": "varchar(20)", "comment": "状态: pending/approved/rejected"}, - {"name": "comment", "type": "varchar(1000)", "comment": "审批意见"}, - {"name": "org_id", "type": "varchar(32)", "comment": "组织ID"}, - {"name": "assigned_at", "type": "timestamp", "comment": "分配时间"}, - {"name": "completed_at", "type": "timestamp", "comment": "完成时间"} + { + "name": "id", + "type": "varchar(32)", + "not_null": true, + "comment": "主键ID" + }, + { + "name": "instance_id", + "type": "varchar(32)", + "not_null": true, + "comment": "所属实例ID" + }, + { + "name": "step_id", + "type": "varchar(32)", + "not_null": true, + "comment": "审批步骤ID" + }, + { + "name": "assignee_id", + "type": "varchar(32)", + "comment": "审批人ID" + }, + { + "name": "status", + "type": "varchar(20)", + "comment": "状态: pending/approved/rejected" + }, + { + "name": "comment", + "type": "varchar(1000)", + "comment": "审批意见" + }, + { + "name": "org_id", + "type": "varchar(32)", + "comment": "组织ID" + }, + { + "name": "assigned_at", + "type": "timestamp", + "comment": "分配时间" + }, + { + "name": "completed_at", + "type": "timestamp", + "comment": "完成时间" + } ], "indexes": [ - {"name": "idx_task_instance", "fields": ["instance_id"], "type": "normal"}, - {"name": "idx_task_assignee", "fields": ["assignee_id"], "type": "normal"}, - {"name": "idx_task_status", "fields": ["status"], "type": "normal"} + { + "name": "idx_task_instance", + "fields": [ + "instance_id" + ], + "type": "normal" + }, + { + "name": "idx_task_assignee", + "fields": [ + "assignee_id" + ], + "type": "normal" + }, + { + "name": "idx_task_status", + "fields": [ + "status" + ], + "type": "normal" + } ], "codes": [ - {"key": "pending", "name": "待审批"}, - {"key": "approved", "name": "已通过"}, - {"key": "rejected", "name": "已驳回"} - ] + { + "key": "pending", + "name": "待审批" + }, + { + "key": "approved", + "name": "已通过" + }, + { + "key": "rejected", + "name": "已驳回" + } + ], + "summary": { + "tablename": "approval_task", + "label": "审批任务", + "comment": "具体审批任务记录" + } } \ No newline at end of file diff --git a/models/approval_workflow.json b/models/approval_workflow.json index faa04e0..5c13258 100644 --- a/models/approval_workflow.json +++ b/models/approval_workflow.json @@ -1,24 +1,96 @@ { "table_name": "approval_workflow", "fields": [ - {"name": "id", "type": "varchar(32)", "not_null": true, "comment": "主键ID"}, - {"name": "name", "type": "varchar(100)", "not_null": true, "comment": "工作流名称"}, - {"name": "module", "type": "varchar(50)", "not_null": true, "comment": "所属模块"}, - {"name": "trigger_event", "type": "varchar(100)", "comment": "触发事件"}, - {"name": "description", "type": "text", "comment": "描述"}, - {"name": "org_id", "type": "varchar(32)", "comment": "组织ID"}, - {"name": "status", "type": "varchar(20)", "default": "Y", "comment": "状态 Y-启用 N-禁用"}, - {"name": "created_at", "type": "timestamp", "comment": "创建时间"}, - {"name": "updated_at", "type": "timestamp", "comment": "更新时间"} + { + "name": "id", + "type": "varchar(32)", + "not_null": true, + "comment": "主键ID" + }, + { + "name": "name", + "type": "varchar(100)", + "not_null": true, + "comment": "工作流名称" + }, + { + "name": "module", + "type": "varchar(50)", + "not_null": true, + "comment": "所属模块" + }, + { + "name": "trigger_event", + "type": "varchar(100)", + "comment": "触发事件" + }, + { + "name": "description", + "type": "text", + "comment": "描述" + }, + { + "name": "org_id", + "type": "varchar(32)", + "comment": "组织ID" + }, + { + "name": "status", + "type": "varchar(20)", + "default": "Y", + "comment": "状态 Y-启用 N-禁用" + }, + { + "name": "created_at", + "type": "timestamp", + "comment": "创建时间" + }, + { + "name": "updated_at", + "type": "timestamp", + "comment": "更新时间" + } ], "indexes": [ - {"name": "idx_workflow_module", "fields": ["module"], "type": "normal"}, - {"name": "idx_workflow_org", "fields": ["org_id"], "type": "normal"}, - {"name": "idx_workflow_status", "fields": ["status"], "type": "normal"} + { + "name": "idx_workflow_module", + "fields": [ + "module" + ], + "type": "normal" + }, + { + "name": "idx_workflow_org", + "fields": [ + "org_id" + ], + "type": "normal" + }, + { + "name": "idx_workflow_status", + "fields": [ + "status" + ], + "type": "normal" + } ], "codes": [ - {"key": "contract_approval", "name": "合同审批"}, - {"key": "customer_approval", "name": "客户审批"}, - {"key": "opportunity_approval", "name": "商机审批"} - ] + { + "key": "contract_approval", + "name": "合同审批" + }, + { + "key": "customer_approval", + "name": "客户审批" + }, + { + "key": "opportunity_approval", + "name": "商机审批" + } + ], + "summary": { + "tablename": "approval_workflow", + "label": "审批工作流定义", + "comment": "审批流程模板定义" + } } \ No newline at end of file