import request from '@/utils/request'

// 查询生猪分类列表
export function listPigCategory(query) {
  return request({
    url: '/app/pigCategory/list',
    method: 'get',
    params: query
  })
}

// 查询生猪分类详细
export function getPigCategory(id) {
  return request({
    url: '/app/pigCategory/' + id,
    method: 'get'
  })
}

// 新增生猪分类
export function addPigCategory(data) {
  return request({
    url: '/app/pigCategory',
    method: 'post',
    data: data
  })
}

// 修改生猪分类
export function updatePigCategory(data) {
  return request({
    url: '/app/pigCategory',
    method: 'put',
    data: data
  })
}

// 删除生猪分类
export function delPigCategory(id) {
  return request({
    url: '/app/pigCategory/' + id,
    method: 'delete'
  })
}

// 查询全部生猪分类列表
export function getAllPigCategory(data) {
  return request({
    url: '/app/pigCategory/optionselect',
    method: 'get',
    params: data
  })
}
