import request from '@/utils/request'

enum API{
  GET_COMPANY_DETAIL_BY_ID = '/crmBusinessLicenseInformation/getById/',
}

export interface companyDetailDataType{
  address: string;
  approvalTime: string;
  businessPeriod: string;
  businessScope: string;
  cancellationTime: string;
  contactName: string;
  contactPhone: string;
  enterpriseName: string;
  enterprisePhone: string;
  enterpriseType: string;
  establishmentDate: string;
  id: number;
  industryCode: string;
  legalRepresentative: string;
  legalRepresentativeId: string;
  paidInCapital: string;
  postalCode: string;
  registerNumber: string;
  registeredCapital: string;
  registrationAuthority: string;
  registrationCategory: string;
  status: string;
  supervisoryAuthority: string;
  unifiedSocialCreditCode: string;
  [key: string]: any
}

export interface companyDetailRes extends AxiosResponse{
  data: companyDetailDataType;
}

export const getCompanyDetailById = (id:string)=> {
  return request.get<any,companyDetailRes>(API.GET_COMPANY_DETAIL_BY_ID+id);
}