import request from '@/utils/request'

const urlPrefix = '/api/water/pumpStation'

export function listPumpStation(query) {
  return request({
    url: urlPrefix + '/page',
    method: 'get',
    params: query
  })
}

export function getPumpStation(id) {
  return request({
    url: urlPrefix + '/' + id,
    method: 'get'
  })
}

export function addPumpStation(data) {
  return request({
    url: urlPrefix,
    method: 'post',
    data: data
  })
}

export function updatePumpStation(data) {
  return request({
    url: urlPrefix,
    method: 'put',
    data: data
  })
}

export function delPumpStation(ids) {
  return request({
    url: urlPrefix + '/' + ids,
    method: 'delete'
  })
}

export function listRecyclePumpStation(query) {
  return request({
    url: urlPrefix + '/recycle/list',
    method: 'get',
    params: query
  })
}

export function restorePumpStation(ids) {
  return request({
    url: urlPrefix + '/recycle/restore/' + ids,
    method: 'post'
  })
}

export function deletePhysicallyPumpStation(ids) {
  return request({
    url: urlPrefix + '/recycle/delete/' + ids,
    method: 'delete'
  })
}
