<?php

namespace App\Exceptions;

use RuntimeException;

class DataQualityException extends RuntimeException
{
    protected array $validationMessages;
    protected int $httpStatus;

    public function __construct(string $message, array $validationMessages = [], int $httpStatus = 422)
    {
        parent::__construct($message);
        $this->validationMessages = $validationMessages;
        $this->httpStatus = $httpStatus;
    }

    public function messages(): array
    {
        return $this->validationMessages;
    }

    public function status(): int
    {
        return $this->httpStatus;
    }
}
