import request from '@/utils/request';

const baseUrl = '/product/brand';

// 查询品牌列表
export function listBrand(params: any) {
  return request.get(baseUrl + '/list', { params });
}

// 获取品牌详情
export function getBrand(id: number | string) {
  return request.get(`${baseUrl}/${id}`);
}

// 新增品牌
export function addBrand(data: any) {
  return request.post(baseUrl, data);
}

// 修改品牌
export function updateBrand(data: any) {
  return request.put(baseUrl, data);
}

// 删除品牌
export function delBrand(id: number | string) {
  return request.delete(`${baseUrl}/${id}`);
}
