src/Entity/System/ProductDate.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * ProductDate
  6.  *
  7.  * @ORM\Table(name="ps_product_date")
  8.  *
  9.  * @ORM\Entity(repositoryClass="App\Repository\System\ProductDateRepository")
  10.  */
  11. class ProductDate
  12. {
  13.     /**
  14.      * @var Product
  15.      *
  16.      * @ORM\Id
  17.      *
  18.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Product", inversedBy="productDates")
  19.      *
  20.      * @ORM\JoinColumn(name="id_product", referencedColumnName="id_product")
  21.      */
  22.     private $product;
  23.     /**
  24.      * @ORM\Id
  25.      *
  26.      * @var ProductAttribute
  27.      *
  28.      * @ORM\OneToOne (targetEntity="App\Entity\System\ProductAttribute", inversedBy="productDate")
  29.      *
  30.      * @ORM\JoinColumn(name="id_product_attribute", referencedColumnName="id_product_attribute")
  31.      */
  32.     private $productAttribute;
  33.     /**
  34.      * @var \DateTime|null
  35.      *
  36.      * @ORM\Column(name="date_upd", type="datetime", nullable=true)
  37.      */
  38.     private $dateUpd;
  39.     /**
  40.      * @var \DateTime|null
  41.      *
  42.      * @ORM\Column(name="date_description", type="datetime", nullable=true)
  43.      */
  44.     private $dateDescription;
  45.     /**
  46.      * @return Product
  47.      */
  48.     public function getProduct(): Product
  49.     {
  50.         return $this->product;
  51.     }
  52.     /**
  53.      * @param Product $product
  54.      *
  55.      * @return ProductDate
  56.      */
  57.     public function setProduct(Product $product): ProductDate
  58.     {
  59.         $this->product $product;
  60.         return $this;
  61.     }
  62.     /**
  63.      * @return ProductAttribute
  64.      */
  65.     public function getProductAttribute(): ProductAttribute
  66.     {
  67.         return $this->productAttribute;
  68.     }
  69.     /**
  70.      * @param ProductAttribute $productAttribute
  71.      *
  72.      * @return ProductDate
  73.      */
  74.     public function setProductAttribute(ProductAttribute $productAttribute): ProductDate
  75.     {
  76.         $this->productAttribute $productAttribute;
  77.         return $this;
  78.     }
  79.     /**
  80.      * @return \DateTime|null
  81.      */
  82.     public function getDateUpd(): ?\DateTime
  83.     {
  84.         return $this->dateUpd;
  85.     }
  86.     /**
  87.      * @param \DateTime|null $dateUpd
  88.      *
  89.      * @return ProductDate
  90.      */
  91.     public function setDateUpd(?\DateTime $dateUpd): ProductDate
  92.     {
  93.         $this->dateUpd $dateUpd;
  94.         return $this;
  95.     }
  96.     /**
  97.      * @return \DateTime|null
  98.      */
  99.     public function getDateDescription(): ?\DateTime
  100.     {
  101.         return $this->dateDescription;
  102.     }
  103.     /**
  104.      * @param \DateTime|null $dateDescription
  105.      *
  106.      * @return ProductDate
  107.      */
  108.     public function setDateDescription(?\DateTime $dateDescription): ProductDate
  109.     {
  110.         $this->dateDescription $dateDescription;
  111.         return $this;
  112.     }
  113. }