using FluentValidation;

namespace Baya.Application.Features.ServiceAreas.Commands.AddNurseServiceArea;

public sealed class AddNurseServiceAreaCommandValidator : AbstractValidator<AddNurseServiceAreaCommand>
{
    public AddNurseServiceAreaCommandValidator()
    {
        RuleFor(x => x.CityId).GreaterThan(0);
        RuleFor(x => x.DistrictId).GreaterThan(0).When(x => x.DistrictId.HasValue);
    }
}
