-- 修正活动审批默认模板为两级（运营经理→运营总监）
-- 与PRD保持一致

-- 更新活动创建审批模板为两级
UPDATE sys_approval_flow
SET nodes = '[{"nodeIndex":1,"nodeName":"运营经理审批","approverType":"ROLE","roleCode":"operation_manager"},{"nodeIndex":2,"nodeName":"运营总监审批","approverType":"ROLE","roleCode":"operation_director"}]',
    flow_name = '活动创建审批（两级）'
WHERE trigger_event = 'ACTIVITY_SUBMIT' AND flow_code = 'ACTIVITY_SUBMIT_APPROVAL';

-- 更新活动更新审批模板为两级
UPDATE sys_approval_flow
SET nodes = '[{"nodeIndex":1,"nodeName":"运营经理审批","approverType":"ROLE","roleCode":"operation_manager"},{"nodeIndex":2,"nodeName":"运营总监审批","approverType":"ROLE","roleCode":"operation_director"}]',
    flow_name = '活动更新审批（两级）'
WHERE trigger_event = 'ACTIVITY_UPDATE' AND flow_code = 'ACTIVITY_UPDATE_APPROVAL';
