import { http } from '@/utils/http/axios';

export interface Role {
  roleId: number;
  roleName: string;
}

export interface RoleList {
  list?: Role[];
}

//获取所有角色
export function getAllRoles(): Promise<RoleList> {
  return http.request({
    url: '/role/getAllRoles',
    method: 'get',
  });
}

export interface Department {
  deptId: number;
  createDate: string;
  modifyDate: string;
  deptName: string;
  treePath: string;
  grade: number;
  parent: number;
  orderNum: number | null;
  isEnable: boolean;
}
//获取所有组织
export function getAllDepartments(): Promise<Department[]> {
  return http.request({
    url: '/dept/getAllDept',
    method: 'get',
  });
}
