import request from '@/utils/request';

export function getAllMenuPermissions(params = {}) {
  return request({
    url: '/platform/allmenupermissions',
    method: 'get',
    params
  });
}

export function getRolePermissions(roleId) {
  return request({
    url: `/platform/rolepermissions/${roleId}`,
    method: 'get'
  });
}

export function assignRolePermissions(roleId, permissions) {
  return request({
    url: `/platform/assignrolepermissions/${roleId}`,
    method: 'post',
    data: { permissions }
  });
}
