import { http } from "@/utils/http";

/** 获取消息列表 */
export const getMessageList = (params?: object) => {
  return http.request<any>("get", "/message/list", { params });
};

/** 发送消息 */
export const sendMessage = (data: object) => {
  return http.request<any>("post", "/message/send", { data });
};

/** 删除消息 */
export const deleteMessage = (id: number) => {
  return http.request<any>("post", `/message/delete/${id}`);
};

/** 批量标记已读 */
export const batchReadMessage = (data: object) => {
  return http.request<any>("post", "/message/batchRead", { data });
};

/** 批量删除消息 */
export const batchDeleteMessage = (data: object) => {
  return http.request<any>("post", "/message/batchDelete", { data });
};

/** 搜索管理员用户 */
export const searchAdminUser = (params?: object) => {
  return http.request<any>("get", "/adminUser/search", { params });
};
