import request from '@/config/axios'

// 报警信息 VO
export interface WarnVO {
  uuid: string // uuid
}

// 报警信息 API
export const WarnApi = {
  // 查询报警信息分页
  getWarnPage: async (params: any) => {
    return await request.get({ url: `/logistics/warn/page`, params })
  },

  // 查询报警信息详情
  getWarn: async (id: number) => {
    return await request.get({ url: `/logistics/warn/get?id=` + id })
  },

  // 新增报警信息
  createWarn: async (data: WarnVO) => {
    return await request.post({ url: `/logistics/warn/create`, data })
  },

  // 修改报警信息
  updateWarn: async (data: WarnVO) => {
    return await request.put({ url: `/logistics/warn/update`, data })
  },

  // 删除报警信息
  deleteWarn: async (id: number) => {
    return await request.delete({ url: `/logistics/warn/delete?id=` + id })
  },

  // 导出报警信息 Excel
  exportWarn: async (params) => {
    return await request.download({ url: `/logistics/warn/export-excel`, params })
  },
}
