feat(domain): Rubro entity + domain exceptions (CAT-001)

This commit is contained in:
2026-04-18 19:17:33 -03:00
parent 4a88cb4319
commit 4c9b7eabaf
10 changed files with 620 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
namespace SIGCM2.Domain.Exceptions;
/// <summary>
/// Thrown when attempting to create or move a Rubro under an inactive parent. → HTTP 400
/// </summary>
public sealed class RubroPadreInactivoException : DomainException
{
public int ParentId { get; }
public RubroPadreInactivoException(int parentId)
: base($"El padre con id '{parentId}' está inactivo y no puede tener hijos.")
{
ParentId = parentId;
}
}