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

/** 设备列表 */
export const getDeviceList = (data?: object) => {
  return http.request<any>("post", "/washDevice/list", { data });
};

/** 设备详情 */
export const getDeviceDetail = (id: number) => {
  return http.request<any>("get", `/washDevice/detail/${id}`);
};

/** 删除设备 */
export const removeDevice = (id: number) => {
  return http.request<any>("get", `/washDevice/remove/${id}`);
};

/** 修改设备 */
export const modifyDevice = (data: object) => {
  return http.request<any>("post", "/washDevice/modify", { data });
};

/** 新增设备 */
export const addDevice = (data: object) => {
  return http.request<any>("post", "/washDevice/add", { data });
};

/** 停止设备关闭订单 */
export const stopDevice = (shortId: string) => {
  return http.request<any>("post", `/washDevice/stopDevice/${shortId}`);
};
