using SIGCM2.Domain.Exceptions;

namespace SIGCM2.Domain.Pricing.Exceptions;

/// <summary>
/// PRC-001 — Thrown when a ChargeableCharConfig value fails domain business validation
/// (e.g., PricePerUnit ≤ 0, Symbol empty/too long, Category unknown, ValidFrom in the past).
/// → HTTP 400
/// Used as defense-in-depth alongside FluentValidation in the Application layer.
/// </summary>
public sealed class ChargeableCharConfigInvalidException : DomainException
{
    public string Field { get; }
    public string Reason { get; }

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