<?php

declare(strict_types=1);

namespace KupShop\GraphQLBundle\ApiAdmin\Types\Catalog\Product\Response;

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

/**
 * Návratová hodnota pro aktualizaci produktu a jeho atributů.
 *
 * @Type()
 */
class ProductMutateResponse extends MutateResponse
{
    /**
     * Zaktualizovaný objekt produktu.
     *
     * @Field
     */
    public Product $product;

    public function __construct(bool $result, Product $product)
    {
        parent::__construct($result);

        $this->product = $product;
    }
}
