using FluentValidation;
using Monitoring.Core.Domain.CameraManagement;

namespace Monitoring.Features.Cameras.CreateCamera;

public class CreateCameraValidator : AbstractValidator<CreateCameraRequest>
{
	public CreateCameraValidator()
	{
		_ = RuleFor(x => x.AssetId).NotEmpty();
		_ = RuleFor(x => x.Name)
			.NotEmpty()
			.MinimumLength(CameraName.MinLength)
			.MaximumLength(CameraName.MaxLength);
		_ = RuleFor(x => x.Address)
			.NotEmpty()
			.MinimumLength(CameraAddress.MinLength)
			.MaximumLength(CameraAddress.MaxLength);
	}
}
