<?php

namespace App\Services\Certification;

class ValidationIssue
{
    public string $severity;
    public string $code;
    public string $message;
    public array $context;

    public function __construct(
        string $severity,
        string $code,
        string $message,
        array $context = []
    ) {
        $this->severity = $severity;
        $this->code = $code;
        $this->message = $message;
        $this->context = $context;
    }

    public function isCritical(): bool
    {
        return $this->severity === 'critical';
    }

    public function isWarning(): bool
    {
        return $this->severity === 'warning';
    }
}
