<?php
declare(strict_types=1);

namespace App\Core\DTO;

final class StockMovementResult
{
    private function __construct(
        public readonly bool $success,
        public readonly ?int $movementId,
        public readonly ?string $error,
    ) {}

    public static function ok(int $movementId): self
    {
        return new self(true, $movementId, null);
    }

    public static function fail(string $error): self
    {
        return new self(false, null, $error);
    }
}
