using FluentValidation;

using Monitoring.Core.Domain.AssetManagement;

namespace Monitoring.Features.Photos.UpdatePhoto;

public class UpdatePhotoValidator : AbstractValidator<UpdatePhotoRequest>
{
	public UpdatePhotoValidator()
	{
		_ = RuleFor(x => x.AssetId).NotEmpty();

		_ = RuleFor(x => x.Name).NotEmpty()
			.MinimumLength(AssetName.MinLength)
			.MaximumLength(AssetName.MaxLength);

		_ = RuleFor(x => x.Description).NotEmpty()
			.MinimumLength(AssetDescription.MinLength)
			.MaximumLength(AssetDescription.MaxLength);

		_ = RuleFor(x => x.Base64).NotEmpty();
	}
}
