src/Entity/System/ProductEan.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * ProductEan
  6.  *
  7.  * @ORM\Table(name="ps_product_amazon_ean")
  8.  *
  9.  * @ORM\Entity(repositoryClass="App\Repository\System\ProductEanRepository")
  10.  */
  11. class ProductEan
  12. {
  13.     /**
  14.      * @var Product
  15.      *
  16.      * @ORM\ManyToOne(targetEntity="Product", inversedBy="productEans")
  17.      *
  18.      * @ORM\JoinColumn(name="id_product", referencedColumnName="id_product")
  19.      *
  20.      * @ORM\Id
  21.      */
  22.     private $product;
  23.     /**
  24.      * @var ProductAttribute
  25.      *
  26.      * @ORM\ManyToOne(targetEntity="ProductAttribute", inversedBy="productEans")
  27.      *
  28.      * @ORM\JoinColumn(name="id_product_attribute", referencedColumnName="id_product_attribute")
  29.      */
  30.     private $productAttribute;
  31.     /**
  32.      * @var string
  33.      *
  34.      * @ORM\Column(name="ean", type="string", length=13)
  35.      *
  36.      * @ORM\Id
  37.      */
  38.     private $ean;
  39.     /**
  40.      * @param Product $product
  41.      *
  42.      * @return ProductEan
  43.      */
  44.     public function setProduct(Product $product): ProductEan
  45.     {
  46.         $this->product $product;
  47.         return $this;
  48.     }
  49.     /**
  50.      * @return Product
  51.      */
  52.     public function getProduct(): Product
  53.     {
  54.         return $this->product;
  55.     }
  56.     /**
  57.      * @param ProductAttribute $productAttribute
  58.      *
  59.      * @return ProductEan
  60.      */
  61.     public function setProductAttribute(ProductAttribute $productAttribute): ProductEan
  62.     {
  63.         $this->productAttribute $productAttribute;
  64.         return $this;
  65.     }
  66.     /**
  67.      * @return ProductAttribute|null
  68.      */
  69.     public function getProductAttribute(): ?ProductAttribute
  70.     {
  71.         return $this->productAttribute;
  72.     }
  73.     /**
  74.      * @param string $ean
  75.      *
  76.      * @return ProductEan
  77.      */
  78.     public function setEan(string $ean): ProductEan
  79.     {
  80.         $this->ean $ean;
  81.         return $this;
  82.     }
  83.     /**
  84.      * @return string
  85.      */
  86.     public function getEan(): string
  87.     {
  88.         return $this->ean;
  89.     }
  90. }