import request from "@/utils/request";

// 获取品牌管理列表
export function getBrandbaseList(query) {
  return request({
    url: "/brand/brandbase/page",
    method: "get",
    params: query,
  });
}
//新增品牌
export function addBrand(data) {
  return request({
    url: "/brand/brandbase/save",
    method: "post",
    data: data,
  });
}
//编辑品牌
export function updateBrand(data) {
  return request({
    url: "/brand/brandbase/update",
    method: "post",
    data: data,
  });
}
// 删除品牌
export function deleteBrand(id) {
  return request({
    url: '/brand/brandbase/del?ids=' + id,
    method: "delete",
  });
}

// 获取品牌信息（id）
export function getBrandInfo(id) {
  return request({
    url: `/brand/brandbase/detail/${id}`,
    method: "get",
  });
}
//品牌启用停用
export function updateStatusBrand(data) {
  return request({
    url: "brand/brandbase/updateStatus",
    method: "post",
    data: data,
  });
}
// 获取品牌审核列表
export function applicationrecord(query) {
  return request({
    url: "/brand/applicationrecord/page",
    method: "get",
    params: query,
  });
}
// 品牌审核驳回
export function rejectBrand(data) {
  return request({
    url: "/brand/applicationrecord/approve",
    method: "post",
    data: data,
  });
}

// 获取续期列表
export function applicationrecordList(query) {
  return request({
    url: "/brand/applicationrenewal/page",
    method: "get",
    params: query,
  });
}
// 续期审核驳回
export function applicationrenewalApprove(data) {
  return request({
    url: "/brand/applicationrenewal/approve",
    method: "post",
    data: data,
  });
}

// 获取品牌使用管理列表
export function brandUsingList(query) {
  return request({
    url: "/brand/brandUsingSystem/page",
    method: "get",
    params: query,
  });
}
// 新增品牌使用
export function addBrandUsing(data) {
  return request({
    url: "/brand/brandUsingSystem/save",
    method: "post",
    data: data,
  });
}

// 编辑品牌使用
export function updateBrandUsing(data) {
  return request({
    url: "/brand/brandUsingSystem/update",
    method: "post",
    data: data,
  });
}

// 获取品牌使用管理详情（id）
export function getBrandUsing(id) {
  return request({
    url: `/brand/brandUsingSystem/detail/${id}`,
    method: "get",
  });
}

//  删除品牌使用管理
export function deleteBrandUsing(id) {
  return request({
    url: '/brand/brandUsingSystem/del?ids=' + id,
    method: "delete",
  });
}

//品牌使用管理启用停用
export function updateStatusBrandUsing(data) {
  return request({
    url: "/brand/brandUsingSystem/enable",
    method: "post",
    data: data,
  });
}
