package com.ecep.contract.ds.company;

import com.ecep.contract.ds.company.service.*;
import org.springframework.beans.BeansException;

public interface CompanyContext {

    <T> T getBean(Class<T> requiredType) throws BeansException;

    default CompanyService getCompanyService() {
        return getBean(CompanyService.class);
    }

    default CompanyOldNameService getCompanyOldNameService() {
        return getBean(CompanyOldNameService.class);
    }

    default CompanyFileTypeService getCompanyFileTypeService() {
        return getBean(CompanyFileTypeService.class);
    }

    default CompanyFileService getCompanyFileService() {
        return getBean(CompanyFileService.class);
    }

    default CompanyBankAccountService getCompanyBankAccountService() {
        return getBean(CompanyBankAccountService.class);
    }

    default CompanyBlackReasonService getCompanyBlackReasonService() {
        return getBean(CompanyBlackReasonService.class);
    }

    default CompanyInvoiceInfoService getCompanyInvoiceInfoService() {
        return getBean(CompanyInvoiceInfoService.class);
    }
}
