using DAL._Shared.SharedModels;
using DAL._Shared.SharedRepositories;
using DAL.Models.Entities;
using DAL.Repositories;
using HRD.WebApi.Repositories;
using Microsoft.Extensions.DependencyInjection;

namespace StaffDBServer.Extends
{
    public static class ServiceExtensions4BaseRepository
    {
        public static IServiceCollection ConfigureRepositoryWrapper(this IServiceCollection services)
        {
            services.AddScoped<IBaseRepository<Subsidiary>, SubsidiaryRepository>();
            services.AddScoped<IBaseRepository<WindreamInputFolder>, WindreamInputFolderRepository>();
            services.AddScoped<IBaseRepository<WindreamSearchToDepartment>, WindreamSearchToDepartmentRepository>();
            services.AddScoped<IBaseRepository<WindreamSearchItemToWindreamSearchToDepartment>, WindreamSearchItemToWindreamSearchToDepartmentRepository>();
            services.AddScoped<IBaseRepository<WindreamSearchItem>, WindreamSearchItemRepository>();
            services.AddScoped<IBaseRepository<WindreamSearch>, WindreamSearchRepository>();
            services.AddScoped<IBaseRepository<WindreamIndexToWindreamSearchToDepartment>, WindreamIndexToWindreamSearchToDepartmentRepository>();
            services.AddScoped<IBaseRepository<WindreamIndex>, WindreamIndexRepository>();
            services.AddScoped<IBaseRepository<WindreamColumnsToDepartment>, WindreamColumnsToDepartmentRepository>();
            services.AddScoped<IBaseRepository<WebAppToWebAppRole>, WebAppToWebAppRoleRepository>();
            services.AddScoped<IBaseRepository<WebAppToWebAppAdditionalRole>, WebAppToWebAppAdditionalRoleRepository>();
            services.AddScoped<IBaseRepository<WebAppToDepartment>, WebAppToDepartmentRepository>();
            services.AddScoped<IBaseRepository<WebAppAdditionalRole>, WebAppAdditionalRoleRepository>();
            services.AddScoped<IBaseRepository<EmployeeToWebApp>, EmployeeToWebAppRepository>();
            services.AddScoped<IBaseRepository<EmployeeToDepartment>, EmployeeToDepartmentRepository>();
            services.AddScoped<IBaseRepository<EmployeeToAttribute>, EmployeeToAttributeRepository>();
            services.AddScoped<IBaseRepository<Employee>, EmployeeRepository>();
            services.AddScoped<IBaseRepository<DocumentArtToDepartment>, DocumentArtToDepartmentRepository>();
            services.AddScoped<IBaseRepository<DepartmentToWebAppToEmployeeForWindream>, DepartmentToWebAppToEmployeeForWindreamRepository>();
            services.AddScoped<IBaseRepository<WebAppRole>, WebAppRoleRepository>();
            services.AddScoped<IBaseRepository<WebApp>, WebAppRepository>();
            services.AddScoped<IBaseRepository<Rang>, RangRepository>();
            services.AddScoped<IBaseRepository<Project>, ProjectRepository>();
            services.AddScoped<IBaseRepository<EmployeeStatus>, EmployeeStatusRepository>();
            services.AddScoped<IBaseRepository<EmployeeAttribute>, EmployeeAttributeRepository>();
            services.AddScoped<IBaseRepository<DocumentArt>, DocumentArtRepository>();
            services.AddScoped<IBaseRepository<Department>, DepartmentRepository>();
            services.AddScoped<IBaseRepository<CostCentre>, CostCentreRepository>();
            services.AddScoped<IBaseRepository<AdWebAppToWebAppRole>, AdWebAppToWebAppRoleRepository>();
            services.AddScoped<IBaseRepository<WebAppUser>, WebAppUserRepository>();
            services.AddScoped<IBaseRepository<WebAppEmployeeInfo>, WebAppEmployeeInfoRepository>();

            return services;
        }
    }
}