import request from '@/utils/request'

export function allBrand() {
  return request({
    url: '/mapi/cloth/brand/all',
    method: 'get',
  })
}

// 查询衣服品牌列表
export function listBrand(query) {
  return request({
    url: '/mapi/cloth/brand/list',
    method: 'get',
    params: query
  })
}

// 查询衣服品牌详细
export function getBrand(id) {
  return request({
    url: '/mapi/cloth/brand/' + id,
    method: 'get'
  })
}

// 新增衣服品牌
export function addBrand(data) {
  return request({
    url: '/mapi/cloth/brand',
    method: 'post',
    data: data
  })
}

// 修改衣服品牌
export function updateBrand(data) {
  return request({
    url: '/mapi/cloth/brand',
    method: 'put',
    data: data
  })
}

// 删除衣服品牌
export function delBrand(id) {
  return request({
    url: '/mapi/cloth/brand/' + id,
    method: 'delete'
  })
}


// 修改衣服品牌状态
export function updateBrandStatus(id,status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/mapi/cloth/brand/updateStatus',
    method: 'post',
    data: data
  })
}
