import axiosInstance from '../../utils/axios';

// 权限管理 API
export const userPermissionApi = {
  // 获取用户角色列表
  getUserRoleList: (userId: number): Promise<number[]> => {
    return axiosInstance.get(`/system/permission/list-user-roles?userId=${userId}`);
  },

  // 分配用户角色
  assignUserRole: (params: {
    userId: number;
    roleIds: number[];
  }): Promise<void> => {
    return axiosInstance.post('/system/permission/assign-user-role', params);
  },
};

