<?php

namespace Modules\Vrc\Services\RepairOrder;

use RuntimeException;

/**
 * Thrown when a repair-order status transition is not permitted by the state
 * machine (spec §4.3). Controllers map this to an HTTP 409 / validation error.
 */
class InvalidTransitionException extends RuntimeException
{
    public string $from;

    public string $to;

    public function __construct(string $from, string $to)
    {
        $this->from = $from;
        $this->to = $to;
        parent::__construct("Illegal repair-order transition: {$from} → {$to}.");
    }
}
