using FluentValidation;

namespace Baya.Application.Features.PatientCareRecords.Commands.WritePatientCareRecord;

public sealed class WritePatientCareRecordCommandValidator : AbstractValidator<WritePatientCareRecordCommand>
{
    public WritePatientCareRecordCommandValidator()
    {
        RuleFor(x => x.PatientId).GreaterThan(0);
        RuleFor(x => x.BookingId).GreaterThan(0).When(x => x.BookingId.HasValue);
        RuleFor(x => x.Body).NotEmpty().MaximumLength(8000);
    }
}
