using FluentValidation;

namespace ColaFlow.Modules.ProjectManagement.Application.Commands.CreateEpic;

/// <summary>
/// Validator for CreateEpicCommand
/// </summary>
public sealed class CreateEpicCommandValidator : AbstractValidator<CreateEpicCommand>
{
    public CreateEpicCommandValidator()
    {
        RuleFor(x => x.ProjectId)
            .NotEmpty().WithMessage("Project ID is required");

        RuleFor(x => x.Name)
            .NotEmpty().WithMessage("Epic name is required")
            .MaximumLength(200).WithMessage("Epic name cannot exceed 200 characters");

        RuleFor(x => x.CreatedBy)
            .NotEmpty().WithMessage("Created by user ID is required");
    }
}
