Add TagType CRUD

This commit is contained in:
Oscar Morales
2025-07-31 19:07:40 -06:00
parent 542df8a203
commit e6d68f4fd3
18 changed files with 646 additions and 1 deletions

View File

@@ -5,6 +5,11 @@ using Core.Inventory.Application.UseCases.Inventory.Input.Variant;
using Core.Inventory.Application.UseCases.Inventory.Ports;
using Core.Inventory.Application.UseCases.Inventory.Validator.Base;
using Core.Inventory.Application.UseCases.Inventory.Validator.Variant;
using Core.Inventory.Application.UseCases.TagType;
using Core.Inventory.Application.UseCases.TagType.Adapter;
using Core.Inventory.Application.UseCases.TagType.Input;
using Core.Inventory.Application.UseCases.TagType.Ports;
using Core.Inventory.Application.UseCases.TagType.Validator;
using FluentValidation;
using Lib.Architecture.BuildingBlocks;
@@ -66,6 +71,30 @@ namespace Core.Inventory.Service.API.Extensions
services.AddScoped<IValidator<GetFurnitureVariantsByIdsRequest>, GetFurnitureVariantsByIdsValidator>();
#endregion
#region TagType Services
services.AddScoped<ITagTypePort, TagTypePort>();
services.AddScoped<IComponentHandler<GetAllTagTypesRequest>, TagTypeHandler>();
services.AddScoped<IComponentHandler<GetTagTypeRequest>, TagTypeHandler>();
services.AddValidatorsFromAssemblyContaining<GetAllTagTypesByListValidator>();
services.AddScoped<IValidator<GetAllTagTypesByListRequest>, GetAllTagTypesByListValidator>();
services.AddScoped<IComponentHandler<GetAllTagTypesByListRequest>, TagTypeHandler>();
services.AddValidatorsFromAssemblyContaining<CreateTagTypeValidator>();
services.AddScoped<IValidator<CreateTagTypeRequest>, CreateTagTypeValidator>();
services.AddScoped<IComponentHandler<CreateTagTypeRequest>, TagTypeHandler>();
services.AddValidatorsFromAssemblyContaining<UpdateTagTypeValidator>();
services.AddScoped<IValidator<UpdateTagTypeRequest>, UpdateTagTypeValidator>();
services.AddScoped<IComponentHandler<UpdateTagTypeRequest>, TagTypeHandler>();
services.AddValidatorsFromAssemblyContaining<ChangeTagTypeStatusValidator>();
services.AddScoped<IValidator<ChangeTagTypeStatusRequest>, ChangeTagTypeStatusValidator>();
services.AddScoped<IComponentHandler<ChangeTagTypeStatusRequest>, TagTypeHandler>();
#endregion
return services;
}
}