<?php

declare(strict_types=1);

namespace KupShop\GraphQLBundle\ApiAdmin\Types\Order\Response;

use KupShop\GraphQLBundle\ApiAdmin\Types\MutateResponse;
use KupShop\GraphQLBundle\ApiAdmin\Types\Order\Order;
use TheCodingMachine\GraphQLite\Annotations\Field;
use TheCodingMachine\GraphQLite\Annotations\Type;

/**
 * Návratová hodnota pro aktualizaci produktu a jeho atributů.
 *
 * @Type()
 */
class OrderMutateResponse extends MutateResponse
{
    /**
     * Zaktualizovaný objekt objednávky.
     *
     * @Field
     */
    public Order $order;

    public function __construct(bool $result, Order $order)
    {
        parent::__construct($result);

        $this->order = $order;
    }
}
