import { get } from "@/utils/request";

export interface UserInfoType {
  alias: string;
  all_dept_name: string;
  avatar: string;
  dept: string;
  dept_id: number;
  email: string;
  job: string;
  job_name: string;
  job_type: string;
  mobile: string;
  user_id: number;
  username: string;
}

interface DropListItem {
  label: string;
  value: string | number;
  mark: string;
}

export const getUserInfo = () =>
  get<UserInfoType>({
    url: "/api/home/grade",
  });

export const logout = () => get({ url: "/api/common/logout" });

export const getProjectDrop = () =>
  get<DropListItem[]>({
    url: "/api/v1/project/get-project-drop",
  });
