import request from '@/utils/request'

// 查询自由消费定制菜单列表
export function listCustom(query) {
  return request({
    url: '/canteen/custom/list',
    method: 'get',
    params: query
  })
}

// 查询自由消费定制菜单详细
export function getCustom(customId) {
  return request({
    url: '/canteen/custom/' + customId,
    method: 'get'
  })
}

// 新增自由消费定制菜单
export function addCustom(data) {
  return request({
    url: '/canteen/custom',
    method: 'post',
    data: data
  })
}

// 修改自由消费定制菜单
export function updateCustom(data) {
  return request({
    url: '/canteen/custom',
    method: 'put',
    data: data
  })
}

// 删除自由消费定制菜单
export function delCustom(customId) {
  return request({
    url: '/canteen/custom/' + customId,
    method: 'delete'
  })
}

// 导出自由消费定制菜单
export function exportCustom(query) {
  return request({
    url: '/canteen/custom/export',
    method: 'get',
    params: query
  })
}