import request from '@/utils/request'

// 查询讨论列表
export function listDiscussions(query) {
  return request({
    url: '/discussions/list',
    method: 'get',
    params: query
  })
}

// 查询讨论详细
export function getDiscussions(id) {
  return request({
    url: '/discussions/' + id,
    method: 'get'
  })
}

// 新增讨论
export function addDiscussions(data) {
  return request({
    url: '/discussions',
    method: 'post',
    data: data
  })
}

// 修改讨论
export function updateDiscussions(data) {
  return request({
    url: '/discussions',
    method: 'put',
    data: data
  })
}

// 删除讨论
export function delDiscussions(id) {
  return request({
    url: '/discussions/' + id,
    method: 'delete'
  })
}
