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.     public function getProduct(): Product
  50.     {
  51.         return $this->product;
  52.     }
  53.     /**
  54.      * @param ProductAttribute $productAttribute
  55.      *
  56.      * @return ProductEan
  57.      */
  58.     public function setProductAttribute(ProductAttribute $productAttribute): ProductEan
  59.     {
  60.         $this->productAttribute $productAttribute;
  61.         return $this;
  62.     }
  63.     /**
  64.      * @return ProductAttribute|null
  65.      */
  66.     public function getProductAttribute(): ?ProductAttribute
  67.     {
  68.         return $this->productAttribute;
  69.     }
  70.     /**
  71.      * @param string $ean
  72.      *
  73.      * @return ProductEan
  74.      */
  75.     public function setEan(string $ean): ProductEan
  76.     {
  77.         $this->ean $ean;
  78.         return $this;
  79.     }
  80.     /**
  81.      * @return string
  82.      */
  83.     public function getEan(): string
  84.     {
  85.         return $this->ean;
  86.     }
  87. }