namespace Application.Enrollments.Queries;

using Application.Common;
using FluentValidation;

/// <summary>
/// Validator for <see cref="GetClassmatesQuery"/>.
/// Ensures the student ID is valid before querying classmates.
/// </summary>
public class GetClassmatesValidator : AbstractValidator<GetClassmatesQuery>
{
    public GetClassmatesValidator()
    {
        RuleFor(x => x.StudentId)
            .GreaterThan(0).WithMessage(ValidationPatterns.InvalidIdMessage);
    }
}
