import { request } from '/@/utils/service';


const apiPrefix = '/api/assets/company/';

export function getCardData(query: any) {
  return request({
    url: apiPrefix + 'card/',
    method: 'GET',
    params: query,
  });
}

export function getTableData(query: any) {
  return request({
    url: apiPrefix + 'shop/',
    method: 'GET',
    params: query,
  });
}

export function getCompanyOverview(query: any) {
  return request({
    url: apiPrefix + `${query.companyId}/`,
    method: 'GET',
  });
}

export function updateShopDetail(query: any) {
  return request({
    url: apiPrefix + `${query.id}/`,
    method: 'POST',
    params: { partial: query.partial },
    data: query.formData,
  });
}

export function createCompany(body: any) {
  return request({
    url: apiPrefix + 'create/',
    method: 'POST',
    data: body,
  });
}
