import request from '@/utils/request'

// 查询自定义衣物列表
export function listItem(query) {
    return request({
        url: '/mapi/core/customItem/list',
        method: 'get',
        params: query
    })
}

// 查询自定义衣物详细
export function getItem(id) {
    return request({
        url: '/mapi/core/customItem/' + id,
        method: 'get'
    })
}

// 新增自定义衣物
export function addItem(data) {
    return request({
        url: '/mapi/core/customItem',
        method: 'post',
        data: data
    })
}

// 修改自定义衣物
export function updateItem(data) {
    return request({
        url: '/mapi/core/customItem',
        method: 'put',
        data: data
    })
}

// 删除自定义衣物
export function delItem(id) {
    return request({
        url: '/mapi/core/customItem/' + id,
        method: 'delete'
    })
}

// 自定义衣物状态修改
export function changeItemStatus(id, status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/mapi/core/customItem/changeStatus',
    method: 'put',
    data: data
  })
}

