import request from '@/utils/request'

// 查询饮食记录列表
export function listFoodRecord(query) {
  return request({
    url: '/food-record/admin/list',
    method: 'get',
    params: query
  })
}

// 查询饮食记录详细
export function getFoodRecord(id) {
  return request({
    url: '/food-record/getRecordInfo/' + id,
    method: 'get'
  })
}

// 新增饮食记录
export function addFoodRecord(data) {
  return request({
    url: '/food-record/addRecord',
    method: 'post',
    data: data
  })
}

// 修改饮食记录
export function updateFoodRecord(data) {
  return request({
    url: '/food-record/editRecord',
    method: 'post',
    data: data
  })
}

// 删除饮食记录
export function delFoodRecord(id) {
  return request({
    url: '/food-record/deleteRecord/' + id,
    method: 'post'
  })
}
