<?php

declare(strict_types=1);

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

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

/**
 * Návratová hodnota pro aktualizaci varianty.
 *
 * @Type()
 */
class VariationMutateResponse extends ProductMutateResponse
{
    /**
     * Zaktualizovaná varianta.
     *
     * @Field
     */
    public Variation $variation;

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

        $this->variation = $variation;
    }
}
