import request from '@/utils/request'

// 创建农场任务讨论
export function createDiscuss(data) {
  return request({
    url: '/farm/discuss/create',
    method: 'post',
    data: data
  })
}

// 更新农场任务讨论
export function updateDiscuss(data) {
  return request({
    url: '/farm/discuss/update',
    method: 'put',
    data: data
  })
}

// 删除农场任务讨论
export function deleteDiscuss(id) {
  return request({
    url: '/farm/discuss/delete?id=' + id,
    method: 'delete'
  })
}

// 获得农场任务讨论
export function getDiscuss(id) {
  return request({
    url: '/farm/discuss/get?id=' + id,
    method: 'get'
  })
}

// 获得农场任务讨论分页
export function getDiscussPage(query) {
  return request({
    url: '/farm/discuss/page',
    method: 'get',
    params: query
  })
}

// 导出农场任务讨论 Excel
export function exportDiscussExcel(query) {
  return request({
    url: '/farm/discuss/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
