import fetch from 'utils/fetch';

export function getAllUpkeepItem() {
  return fetch({
    url: '/vehicle/upkeep/item/all',
    method: 'get'
  });
}

export function itemPage(param) {
  return fetch({
    url: '/vehicle/upkeep/item/page',
    method: 'get',
    params: param
  })
}

export function itemAdd(param) {
  return fetch({
    url: '/vehicle/upkeep/item',
    method: 'post',
    params: param
  })
}
export function itemEdit(param) {
  return fetch({
    url: '/vehicle/upkeep/item',
    method: 'put',
    params: param
  })
}

export function itemDelete(id) {
  return fetch({
    url: '/vehicle/upkeep/item/' + id,
    method: 'delete'
  })
}

export function logPage(param) {
  return fetch({
    url: '/vehicle/upkeep/log/page',
    method: 'get',
    params: param
  })
}

export function getLog(id) {
  return fetch({
    url: '/vehicle/upkeep/log/' + id,
    method: 'get'
  })
}
