using FluentValidation;

namespace Baya.Application.Features.Verification.Commands.ConfirmDocumentUpload;

// StepId is route-supplied (set via `command with { StepId = ... }`), so it is not validated here.
public sealed class ConfirmDocumentUploadCommandValidator : AbstractValidator<ConfirmDocumentUploadCommand>
{
    public ConfirmDocumentUploadCommandValidator()
    {
        RuleFor(x => x.ObjectStorageKey).NotEmpty().MaximumLength(400);
        RuleFor(x => x.IntegrityHash).NotEmpty().MaximumLength(64);
        RuleFor(x => x.ContentType).NotEmpty().MaximumLength(100);
        RuleFor(x => x.FileSizeBytes).GreaterThan(0);
        RuleFor(x => x.OriginalFileName).MaximumLength(260);
    }
}
