{ "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": "完成时间"} ], "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"} ], "codes": [ {"key": "pending", "name": "审批中"}, {"key": "approved", "name": "已通过"}, {"key": "rejected", "name": "已驳回"}, {"key": "cancelled", "name": "已取消"} ] }