吸收数字员工管理端低风险动作闭环

This commit is contained in:
baiyanyun
2026-06-12 21:17:51 +08:00
parent be901ee112
commit b3f21adecb
27 changed files with 1186 additions and 11 deletions

View File

@@ -3,6 +3,26 @@ ALTER TABLE `digital_employee_sync_record`
ADD COLUMN `entity_summary` JSON DEFAULT NULL COMMENT '客户端实体摘要' AFTER `contract_version`,
ADD COLUMN `business_view` JSON DEFAULT NULL COMMENT '客户端业务视图投影' AFTER `entity_summary`;
CREATE TABLE IF NOT EXISTS `digital_employee_admin_action` (
`id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '主键',
`_tenant_id` BIGINT DEFAULT NULL COMMENT '租户 ID',
`user_id` BIGINT DEFAULT NULL COMMENT '创建用户 ID',
`client_key` VARCHAR(128) DEFAULT NULL COMMENT '客户端 Key',
`device_id` VARCHAR(128) DEFAULT NULL COMMENT '设备 ID',
`entity_type` VARCHAR(64) DEFAULT NULL COMMENT '实体类型',
`entity_id` VARCHAR(128) DEFAULT NULL COMMENT '实体 ID',
`action` VARCHAR(64) DEFAULT NULL COMMENT '管理端动作',
`status` VARCHAR(32) DEFAULT NULL COMMENT '状态 pending/applied/rejected/failed',
`reason_codes` JSON DEFAULT NULL COMMENT '原因码',
`request_payload` JSON DEFAULT NULL COMMENT '请求附加参数',
`processed_at` DATETIME DEFAULT NULL COMMENT '客户端处理时间',
`modified` DATETIME DEFAULT NULL COMMENT '更新时间',
`created` DATETIME DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `idx_de_admin_action_pending` (`_tenant_id`, `client_key`, `device_id`, `status`, `created`),
KEY `idx_de_admin_action_entity` (`_tenant_id`, `entity_type`, `entity_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='数字员工管理端远程动作意图';
-- Add digital employee admin operations workbench menu and resource.
-- Idempotent for existing tenants: creates menu/resource rows, binds menu to resource,
-- and grants super_admin default access. Other roles can be granted this menu