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

/** 故障订阅列表 */
export const getSubscriberList = (data?: object) => {
  return http.request<any>("get", "/faultSubscriber/list", { params: data });
};

/** 生成绑定二维码 */
export const generateQrcode = (data: { stationId: string }) => {
  return http.request<any>("post", "/faultSubscriber/generateQrcode", { data });
};

/** 解绑订阅 */
export const unsubscribe = (data: { openid: string; stationId: string }) => {
  return http.request<any>("post", "/faultSubscriber/unsubscribe", { data });
};

/** 故障记录列表 */
export const getFaultRecords = (data?: object) => {
  return http.request<any>("get", "/faultSubscriber/faultRecords", { params: data });
};
