namespace SIGCM2.Domain.Exceptions;

/// <summary>
/// Thrown when a ProductPrice value fails domain business validation
/// (e.g., Price &lt;= 0, PriceValidFrom in the past). → HTTP 400
/// Used as defense-in-depth alongside FluentValidation in the Application layer.
/// </summary>
public sealed class ProductPriceInvalidException : DomainException
{
    public string Field { get; }
    public string Reason { get; }

    public ProductPriceInvalidException(string field, string reason)
        : base($"Valor inválido para {field}: {reason}")
    {
        Field = field;
        Reason = reason;
    }
}
