using FluentValidation;
using Meezi.API.Models.Billing;
using Meezi.Core.Constants;
using Meezi.Core.Enums;

namespace Meezi.API.Validators;

public class SubscribeRequestValidator : AbstractValidator<SubscribeRequest>
{
    public SubscribeRequestValidator()
    {
        RuleFor(x => x.PlanTier)
            .Must(PlanPricing.IsBillableOnline)
            .WithMessage("This plan must be purchased via sales contact.");
        RuleFor(x => x.Months).InclusiveBetween(1, 12);
    }
}
