[Add] MasterData Services.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
using AMREZ.EOP.Abstractions.Applications.Tenancy;
|
||||
using AMREZ.EOP.Abstractions.Applications.UseCases.Authentications;
|
||||
using AMREZ.EOP.Abstractions.Applications.UseCases.HumanResources;
|
||||
using AMREZ.EOP.Abstractions.Applications.UseCases.ImportData.Location;
|
||||
using AMREZ.EOP.Abstractions.Applications.UseCases.MasterData.Brand;
|
||||
using AMREZ.EOP.Abstractions.Applications.UseCases.Payments.SlipVerification;
|
||||
using AMREZ.EOP.Abstractions.Applications.UseCases.Payments.SlipVerification.QrDecode;
|
||||
using AMREZ.EOP.Abstractions.Applications.UseCases.Tenancy;
|
||||
@@ -11,10 +13,13 @@ using AMREZ.EOP.Abstractions.Security;
|
||||
using AMREZ.EOP.Abstractions.Storage;
|
||||
using AMREZ.EOP.Application.UseCases.Authentications;
|
||||
using AMREZ.EOP.Application.UseCases.HumanResources;
|
||||
using AMREZ.EOP.Application.UseCases.ImportData.Location;
|
||||
using AMREZ.EOP.Application.UseCases.MasterData.Brand;
|
||||
using AMREZ.EOP.Application.UseCases.Payments.SlipVerification;
|
||||
using AMREZ.EOP.Application.UseCases.Payments.SlipVerification.BankDetect;
|
||||
using AMREZ.EOP.Application.UseCases.Payments.SlipVerification.QrDecode;
|
||||
using AMREZ.EOP.Application.UseCases.Tenancy;
|
||||
using AMREZ.EOP.Domain.Entities.MasterData;
|
||||
using AMREZ.EOP.Domain.Shared.Payments;
|
||||
using AMREZ.EOP.Domain.Shared.Tenancy;
|
||||
using AMREZ.EOP.Infrastructures.Data;
|
||||
@@ -139,6 +144,8 @@ public static class ServiceCollectionExtensions
|
||||
services.AddScoped<IQrDecoder, ZxingQrDecoder>();
|
||||
services.AddScoped<IVerifyFromImageUseCase, VerifyFromImageUseCase>();
|
||||
|
||||
services.AddMasterDataBrands();
|
||||
services.AddMasterDataLocations();
|
||||
// Redis (optional)
|
||||
services.AddSingleton<IConnectionMultiplexer?>(sp =>
|
||||
{
|
||||
@@ -160,4 +167,33 @@ public static class ServiceCollectionExtensions
|
||||
|
||||
return services;
|
||||
}
|
||||
|
||||
|
||||
public static IServiceCollection AddMasterDataBrands(this IServiceCollection services)
|
||||
{
|
||||
// Repo
|
||||
services.AddScoped<IBrandRepository, BrandRepository>();
|
||||
|
||||
// UseCases
|
||||
services.AddScoped<IListBrandsUseCase, ListBrandsUseCase>();
|
||||
services.AddScoped<IGetBrandUseCase, GetBrandUseCase>();
|
||||
services.AddScoped<ICreateBrandUseCase, CreateBrandUseCase>();
|
||||
services.AddScoped<IUpdateBrandUseCase, UpdateBrandUseCase>();
|
||||
services.AddScoped<IDeleteBrandUseCase, DeleteBrandUseCase>();
|
||||
|
||||
return services;
|
||||
}
|
||||
|
||||
public static IServiceCollection AddMasterDataLocations(this IServiceCollection services)
|
||||
{
|
||||
// Repo
|
||||
services.AddScoped<IProvinceRepository, ProvinceRepository>();
|
||||
services.AddScoped<IDistrictRepository, DistrictRepository>();
|
||||
services.AddScoped<ISubdistrictRepository, SubdistrictRepository>();
|
||||
|
||||
// UseCases
|
||||
services.AddScoped<ILocationImportUseCase, LocationImportUseCase>();
|
||||
|
||||
return services;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user