namespace Application.Students.Queries;

using Application.Common;
using FluentValidation;

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