-- Permissões RBAC para módulo Performance

INSERT IGNORE INTO permissions (name, description, category) VALUES
('performance.read', 'Visualizar estatísticas de performance', 'performance'),
('performance.admin', 'Administrar configurações de performance', 'performance');

-- Adicionar permissões ao role admin
INSERT IGNORE INTO role_permissions (role_id, permission_id)
SELECT r.id, p.id
FROM roles r
CROSS JOIN permissions p
WHERE r.name = 'admin' AND p.name LIKE 'performance.%';

