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 int
  15.      *
  16.      * @ORM\Column(type="integer")
  17.      *
  18.      * @ORM\Id
  19.      *
  20.      * @ORM\GeneratedValue(strategy="AUTO")
  21.      */
  22.     private $id;
  23.     /**
  24.      * @var Product
  25.      *
  26.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Product", inversedBy="productEans")
  27.      *
  28.      * @ORM\JoinColumn(name="id_product", referencedColumnName="id_product", nullable=false)
  29.      */
  30.     private $product;
  31.     /**
  32.      * @var ProductAttribute
  33.      *
  34.      * @ORM\ManyToOne(targetEntity="ProductAttribute", inversedBy="productEans")
  35.      *
  36.      * @ORM\JoinColumn(name="id_product_attribute", referencedColumnName="id_product_attribute")
  37.      */
  38.     private $productAttribute;
  39.     /**
  40.      * @var string
  41.      *
  42.      * @ORM\Column(name="ean", type="string", length=13)
  43.      */
  44.     private $ean;
  45.     /**
  46.      * @param Product $product
  47.      *
  48.      * @return ProductEan
  49.      */
  50.     public function setProduct(Product $product): ProductEan
  51.     {
  52.         $this->product $product;
  53.         return $this;
  54.     }
  55.     public function getProduct(): Product
  56.     {
  57.         return $this->product;
  58.     }
  59.     /**
  60.      * @param ProductAttribute $productAttribute
  61.      *
  62.      * @return ProductEan
  63.      */
  64.     public function setProductAttribute(ProductAttribute $productAttribute): ProductEan
  65.     {
  66.         $this->productAttribute $productAttribute;
  67.         return $this;
  68.     }
  69.     /**
  70.      * @return ProductAttribute|null
  71.      */
  72.     public function getProductAttribute(): ?ProductAttribute
  73.     {
  74.         return $this->productAttribute;
  75.     }
  76.     /**
  77.      * @param string $ean
  78.      *
  79.      * @return ProductEan
  80.      */
  81.     public function setEan(string $ean): ProductEan
  82.     {
  83.         $this->ean $ean;
  84.         return $this;
  85.     }
  86.     /**
  87.      * @return string
  88.      */
  89.     public function getEan(): string
  90.     {
  91.         return $this->ean;
  92.     }
  93. }