<?php

namespace KupShop\GraphQLBundle\ApiPos\Types\Order;

use TheCodingMachine\GraphQLite\Annotations\Field;
use TheCodingMachine\GraphQLite\Annotations\Type;

#[Type]
class PosOrderFinish
{
    public function __construct(
        protected string $idOrder,
        protected int $status,
        protected ?string $exception = null,
    ) {
    }

    #[Field(description: 'ID objednávky')]
    public function getIdOrder(): string
    {
        return $this->idOrder;
    }

    #[Field(description: 'Status objednávky')]
    public function getStatus(): int
    {
        return $this->status;
    }

    #[Field(description: 'Chybová hláška (např. kontrola počtu kusů)')]
    public function getException(): ?string
    {
        return $this->exception;
    }
}
