import request from '@/utils/request'

// 创建商品品牌授权
export function createProductBrandEmpower(data) {
  return request({
    url: '/ecw/product-brand-empower/create',
    method: 'post',
    data: data
  })
}

// 更新商品品牌授权
export function updateProductBrandEmpower(data) {
  return request({
    url: '/ecw/product-brand-empower/update',
    method: 'put',
    data: data
  })
}

// 删除商品品牌授权
export function deleteProductBrandEmpower(id) {
  return request({
    url: '/ecw/product-brand-empower/delete?id=' + id,
    method: 'delete'
  })
}

// 获得商品品牌授权
export function getProductBrandEmpower(id) {
  return request({
    url: '/ecw/product-brand-empower/get?id=' + id,
    method: 'get'
  })
}

// 获得商品品牌已授权分页
export function getProductBrandEmpowerPageAuth(query) {
  return request({
    url: '/ecw/product-brand-empower/page/auth',
    method: 'get',
    params: query
  })
}

// 获得商品品牌未授权分页
export function getProductBrandEmpowerPageUnauth(query) {
  return request({
    url: '/ecw/product-brand-empower/page/unauth',
    method: 'get',
    params: query
  })
}

// 获得商品品牌授权分页
export function getProductBrandEmpowerPage(query) {
  return request({
    url: '/ecw/product-brand-empower/page',
    method: 'get',
    params: query
  })
}

// 导出商品品牌授权 Excel
export function exportProductBrandEmpowerExcel(query) {
  return request({
    url: '/ecw/product-brand-empower/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
