INSERT INTO permission (id, permission_code, permission_name, module)
VALUES
    (1013, 'audit.flow.read', '查看审核流配置', 'audit-flow'),
    (1014, 'audit.flow.manage', '管理审核流配置', 'audit-flow'),
    (1015, 'user.enable', '启用用户', 'system'),
    (1016, 'user.disable', '禁用用户', 'system'),
    (1017, 'user.password.reset', '重置用户密码', 'system'),
    (1018, 'user.role.history.read', '查看用户角色变更历史', 'system'),
    (1019, 'role.create', '创建角色', 'system'),
    (1020, 'role.update', '编辑角色', 'system'),
    (1021, 'role.enable', '启用角色', 'system'),
    (1022, 'role.disable', '禁用角色', 'system')
ON DUPLICATE KEY UPDATE permission_name = VALUES(permission_name), module = VALUES(module);

INSERT INTO role_permission (id, tenant_id, role_id, permission_id)
VALUES
    (13, 1, 101, 1013),
    (14, 1, 101, 1014),
    (15, 1, 101, 1015),
    (16, 1, 101, 1016),
    (17, 1, 101, 1017),
    (18, 1, 101, 1018),
    (19, 1, 101, 1019),
    (20, 1, 101, 1020),
    (21, 1, 101, 1021),
    (22, 1, 101, 1022)
ON DUPLICATE KEY UPDATE permission_id = VALUES(permission_id);
