Re-factor on service

This commit is contained in:
2025-06-22 23:16:10 -06:00
parent e99b2c5a5a
commit f76e318f92
26 changed files with 178 additions and 86 deletions

View File

@@ -1,8 +1,10 @@
using Core.Inventory.Application.UseCases.Inventory;
using Core.Inventory.Application.UseCases.Inventory.Adapter;
using Core.Inventory.Application.UseCases.Inventory.Input;
using Core.Inventory.Application.UseCases.Inventory.Input.Base;
using Core.Inventory.Application.UseCases.Inventory.Input.Variant;
using Core.Inventory.Application.UseCases.Inventory.Ports;
using Core.Inventory.Application.UseCases.Inventory.Validator;
using Core.Inventory.Application.UseCases.Inventory.Validator.Base;
using Core.Inventory.Application.UseCases.Inventory.Validator.Variant;
using FluentValidation;
using Lib.Architecture.BuildingBlocks;
@@ -42,6 +44,7 @@ namespace Core.Inventory.Service.API.Extensions
services.AddScoped<IComponentHandler<CreateFurnitureVariantRequest>, InventoryHandler>();
services.AddScoped<IComponentHandler<UpdateFurnitureVariantRequest>, InventoryHandler>();
services.AddScoped<IComponentHandler<ChangeFurnitureVariantStatusRequest>, InventoryHandler>();
services.AddScoped<IComponentHandler<GetFurnitureVariantsByIdsRequest>, InventoryHandler>();
services.AddValidatorsFromAssemblyContaining<CreateFurnitureVariantValidator>();
services.AddScoped<IValidator<CreateFurnitureVariantRequest>, CreateFurnitureVariantValidator>();
@@ -57,6 +60,9 @@ namespace Core.Inventory.Service.API.Extensions
services.AddValidatorsFromAssemblyContaining<GetAllFurnitureVariantsByModelIdValidator>();
services.AddScoped<IValidator<GetAllFurnitureVariantsByModelIdRequest>, GetAllFurnitureVariantsByModelIdValidator>();
services.AddValidatorsFromAssemblyContaining<GetFurnitureVariantsByIdsValidator>();
services.AddScoped<IValidator<GetFurnitureVariantsByIdsRequest>, GetFurnitureVariantsByIdsValidator>();
#endregion
return services;