<?php

namespace App\Services\Warehouse;

class InsufficientStockException extends \RuntimeException
{
    public function __construct(
        public readonly int $partId,
        public readonly float $requested,
        public readonly float $available,
    ) {
        parent::__construct(sprintf(
            'Stoc insuficient pentru piesa #%d: cerut %.3f, disponibil %.3f',
            $partId, $requested, $available
        ));
    }
}
