import request from '@/utils/request'

// 查询作物种植结构列表
export function listStructure(query) {
  return request({
    url: '/crops/structure/',
    method: 'get',
    params: query
  })
}

// 查询作物种植结构详细
export function getStructure(id) {
  return request({
    url: '/crops/structure/' + id,
    method: 'get'
  })
}

// 新增作物种植结构
export function addStructure(data) {
  return request({
    url: '/crops/structure',
    method: 'post',
    data: data
  })
}

// 修改作物种植结构
export function updateStructure(data) {
  return request({
    url: '/crops/structure',
    method: 'put',
    data: data
  })
}

// 删除作物种植结构
export function delStructure(id) {
  return request({
    url: '/crops/structure/' + id,
    method: 'delete'
  })
}
