import request from '@/config/axios'

export interface BrandVO {
  id: number
  name: string
  picUrl: string
  description: string
  sort: number
  status: number
}

// 查询商品品牌列表
export const getBrandPage = async (params) => {
  return await request.get({ url: `/member/brand/page`, params })
}

// 查询商品品牌详情
export const getBrand = async (id: number) => {
  return await request.get({ url: `/member/brand/get?id=` + id })
}

// 新增商品品牌
export const createBrand = async (data: BrandVO) => {
  return await request.post({ url: `/member/brand/create`, data })
}

// 修改商品品牌
export const updateBrand = async (data: BrandVO) => {
  return await request.put({ url: `/member/brand/update`, data })
}

// 删除商品品牌
export const deleteBrand = async (id: number) => {
  return await request.delete({ url: `/member/brand/delete?id=` + id })
}

// 导出商品品牌 Excel
export const exportBrand = async (params) => {
  return await request.download({ url: `/member/brand/export-excel`, params })
}
