feat(medios,secciones): application layer + handlers TDD — ADM-001 B3+B4
- IMedioRepository, ISeccionRepository interfaces - MediosQuery, SeccionesQuery common records - TipoSeccion static AllowedTipos helper - Medios: 6 use cases (Create/Update/Deactivate/Reactivate/List/GetById) with validators, handlers and DTOs - Secciones: 6 use cases mirroring Medios; Create validates MedioId active via IMedioRepository - 52 unit tests (xUnit + NSubstitute) all green; audit LogAsync asserted per mutating handler - DI registrations for all 12 handlers and validators auto-scanned via AddValidatorsFromAssemblyContaining
This commit is contained in:
12
src/api/SIGCM2.Application/Common/MediosQuery.cs
Normal file
12
src/api/SIGCM2.Application/Common/MediosQuery.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using SIGCM2.Domain.Entities;
|
||||
|
||||
namespace SIGCM2.Application.Common;
|
||||
|
||||
/// <summary>Query parameters for listing medios with optional filters and paging.</summary>
|
||||
public sealed record MediosQuery(
|
||||
int Page,
|
||||
int PageSize,
|
||||
bool? Activo,
|
||||
TipoMedio? Tipo,
|
||||
string? Search
|
||||
);
|
||||
11
src/api/SIGCM2.Application/Common/SeccionesQuery.cs
Normal file
11
src/api/SIGCM2.Application/Common/SeccionesQuery.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace SIGCM2.Application.Common;
|
||||
|
||||
/// <summary>Query parameters for listing secciones with optional filters and paging.</summary>
|
||||
public sealed record SeccionesQuery(
|
||||
int Page,
|
||||
int PageSize,
|
||||
int? MedioId,
|
||||
string? Tipo,
|
||||
bool? Activo,
|
||||
string? Search
|
||||
);
|
||||
Reference in New Issue
Block a user