-- 添加审批流程并行/会签支持
ALTER TABLE sys_approval_flow ADD COLUMN node_type VARCHAR(20) DEFAULT 'SERIAL';
COMMENT ON COLUMN sys_approval_flow.node_type IS '节点类型: SERIAL(串行), PARALLEL(并行), COUNTERSIGN(会签)';

-- 审批记录表添加多审批人支持
ALTER TABLE sys_approval_record ADD COLUMN approver_ids VARCHAR(500);
ALTER TABLE sys_approval_record ADD COLUMN approved_count INT DEFAULT 0;
ALTER TABLE sys_approval_record ADD COLUMN rejected_count INT DEFAULT 0;
ALTER TABLE sys_approval_record ADD COLUMN required_approvals INT DEFAULT 1;
COMMENT ON COLUMN sys_approval_record.approver_ids IS '多审批人ID列表(JSON数组)';
COMMENT ON COLUMN sys_approval_record.approved_count IS '已批准数量(并行/会签用)';
COMMENT ON COLUMN sys_approval_record.rejected_count IS '已拒绝数量(并行/会签用)';
COMMENT ON COLUMN sys_approval_record.required_approvals IS '需要审批人数(并行/会签用)';
