vendor/shopware/core/Content/Product/Aggregate/ProductMedia/ProductMediaEntity.php line 12

  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\Content\Product\Aggregate\ProductMedia;
  3. use Shopware\Core\Content\Media\MediaEntity;
  4. use Shopware\Core\Content\Product\ProductCollection;
  5. use Shopware\Core\Content\Product\ProductEntity;
  6. use Shopware\Core\Framework\DataAbstractionLayer\Entity;
  7. use Shopware\Core\Framework\DataAbstractionLayer\EntityCustomFieldsTrait;
  8. use Shopware\Core\Framework\DataAbstractionLayer\EntityIdTrait;
  9. use Shopware\Core\Framework\Log\Package;
  10. #[Package('inventory')]
  11. class ProductMediaEntity extends Entity
  12. {
  13.     use EntityCustomFieldsTrait;
  14.     use EntityIdTrait;
  15.     /**
  16.      * @var string
  17.      */
  18.     protected $productId;
  19.     /**
  20.      * @var string
  21.      */
  22.     protected $mediaId;
  23.     /**
  24.      * @var int
  25.      */
  26.     protected $position;
  27.     /**
  28.      * @var MediaEntity|null
  29.      */
  30.     protected $media;
  31.     /**
  32.      * @var ProductEntity|null
  33.      */
  34.     protected $product;
  35.     /**
  36.      * @var ProductCollection|null
  37.      */
  38.     protected $coverProducts;
  39.     public function getProductId(): string
  40.     {
  41.         return $this->productId;
  42.     }
  43.     public function setProductId(string $productId): void
  44.     {
  45.         $this->productId $productId;
  46.     }
  47.     public function getMediaId(): string
  48.     {
  49.         return $this->mediaId;
  50.     }
  51.     public function setMediaId(string $mediaId): void
  52.     {
  53.         $this->mediaId $mediaId;
  54.     }
  55.     public function getPosition(): int
  56.     {
  57.         return $this->position;
  58.     }
  59.     public function setPosition(int $position): void
  60.     {
  61.         $this->position $position;
  62.     }
  63.     public function getMedia(): ?MediaEntity
  64.     {
  65.         return $this->media;
  66.     }
  67.     public function setMedia(MediaEntity $media): void
  68.     {
  69.         $this->media $media;
  70.     }
  71.     public function getProduct(): ?ProductEntity
  72.     {
  73.         return $this->product;
  74.     }
  75.     public function setProduct(ProductEntity $product): void
  76.     {
  77.         $this->product $product;
  78.     }
  79.     public function getCoverProducts(): ?ProductCollection
  80.     {
  81.         return $this->coverProducts;
  82.     }
  83.     public function setCoverProducts(ProductCollection $coverProducts): void
  84.     {
  85.         $this->coverProducts $coverProducts;
  86.     }
  87. }