feat(domain): Product entity + 5 domain exceptions (PRD-002)

This commit is contained in:
2026-04-19 12:59:58 -03:00
parent 0462970ea1
commit 16197cf242
8 changed files with 530 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
namespace SIGCM2.Domain.Exceptions;
/// <summary>
/// Thrown when a requested Product does not exist. → HTTP 404
/// </summary>
public sealed class ProductNotFoundException : DomainException
{
public int ProductId { get; }
public ProductNotFoundException(int id)
: base($"El producto con id={id} no existe.")
{
ProductId = id;
}
}