using FluentValidation;
using TakeoutSaaS.Application.App.Stores.Queries;

namespace TakeoutSaaS.Application.App.Stores.Validators;

/// <summary>
/// 配送范围检测查询验证器。
/// </summary>
public sealed class CheckStoreDeliveryZoneQueryValidator : AbstractValidator<CheckStoreDeliveryZoneQuery>
{
    /// <summary>
    /// 初始化验证规则。
    /// </summary>
    public CheckStoreDeliveryZoneQueryValidator()
    {
        RuleFor(x => x.StoreId).GreaterThan(0);
        RuleFor(x => x.Longitude).InclusiveBetween(-180, 180);
        RuleFor(x => x.Latitude).InclusiveBetween(-90, 90);
    }
}
