namespace Application.Subjects.Queries;

using Application.Common;
using FluentValidation;

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