using FluentValidation;

namespace Baya.Application.Features.Catalog.Commands.UpdateServiceCategory;

public sealed class UpdateServiceCategoryCommandValidator : AbstractValidator<UpdateServiceCategoryCommand>
{
    // Id is supplied by the route (set after model binding), so it is not validated here.
    public UpdateServiceCategoryCommandValidator()
    {
        RuleFor(x => x.NameFa).NotEmpty().MaximumLength(150);
        RuleFor(x => x.NameEn).NotEmpty().MaximumLength(150);
        RuleFor(x => x.DescriptionFa).MaximumLength(1000);
        RuleFor(x => x.DescriptionEn).MaximumLength(1000);
        RuleFor(x => x.IconKey).MaximumLength(100);
    }
}
