// EN: Validator for GetEodReportQuery.
// VI: Validator cho GetEodReportQuery.

using FluentValidation;
using OrderService.API.Application.Queries.Reports;

namespace OrderService.API.Application.Validations;

/// <summary>
/// EN: Validator for GetEodReportQuery.
/// VI: Validator cho GetEodReportQuery.
/// </summary>
public class GetEodReportQueryValidator : AbstractValidator<GetEodReportQuery>
{
    public GetEodReportQueryValidator()
    {
        RuleFor(x => x.ShopId)
            .NotEmpty()
            .WithMessage("EN: Shop ID is required / VI: Shop ID la bat buoc");

        RuleFor(x => x.ReportDate)
            .NotEmpty()
            .WithMessage("EN: Report date is required / VI: Ngay bao cao la bat buoc")
            .LessThanOrEqualTo(DateTime.UtcNow.Date.AddDays(1))
            .WithMessage("EN: Report date cannot be in the future / VI: Ngay bao cao khong the trong tuong lai");
    }
}
