namespace SIGCM2.Domain.Exceptions;

/// <summary>
/// Thrown when a Product's field violates the flags coherence rules of its ProductType
/// (e.g. RequiresCategory=true but RubroId is null, or HasDuration=true but PriceDurationDays is null). → HTTP 422
/// </summary>
public sealed class ProductTipoFlagsIncoherentesException : DomainException
{
    public string Field { get; }

    public ProductTipoFlagsIncoherentesException(string reason, string field)
        : base($"Incoherencia de flags del tipo de producto: {reason}.")
    {
        Field = field;
    }
}
