src/Eccube/Entity/CustomerFavoriteProduct.php line 28

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of EC-CUBE
  4.  *
  5.  * Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  6.  *
  7.  * http://www.ec-cube.co.jp/
  8.  *
  9.  * For the full copyright and license information, please view the LICENSE
  10.  * file that was distributed with this source code.
  11.  */
  12. namespace Eccube\Entity;
  13. use Doctrine\ORM\Mapping as ORM;
  14. if (!class_exists('\Eccube\Entity\CustomerFavoriteProduct')) {
  15.     /**
  16.      * CustomerFavoriteProduct
  17.      *
  18.      * @ORM\Table(name="dtb_customer_favorite_product")
  19.      * @ORM\InheritanceType("SINGLE_TABLE")
  20.      * @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
  21.      * @ORM\HasLifecycleCallbacks()
  22.      * @ORM\Entity(repositoryClass="Eccube\Repository\CustomerFavoriteProductRepository")
  23.      */
  24.     class CustomerFavoriteProduct extends \Eccube\Entity\AbstractEntity
  25.     {
  26.         /**
  27.          * @var int
  28.          *
  29.          * @ORM\Column(name="id", type="integer", options={"unsigned":true})
  30.          * @ORM\Id
  31.          * @ORM\GeneratedValue(strategy="IDENTITY")
  32.          */
  33.         private $id;
  34.         /**
  35.          * @var \DateTime
  36.          *
  37.          * @ORM\Column(name="create_date", type="datetimetz")
  38.          */
  39.         private $create_date;
  40.         /**
  41.          * @var \DateTime
  42.          *
  43.          * @ORM\Column(name="update_date", type="datetimetz")
  44.          */
  45.         private $update_date;
  46.         /**
  47.          * @var \Eccube\Entity\Customer
  48.          *
  49.          * @ORM\ManyToOne(targetEntity="Eccube\Entity\Customer", inversedBy="CustomerFavoriteProducts")
  50.          * @ORM\JoinColumns({
  51.          *   @ORM\JoinColumn(name="customer_id", referencedColumnName="id")
  52.          * })
  53.          */
  54.         private $Customer;
  55.         /**
  56.          * @var \Eccube\Entity\Product
  57.          *
  58.          * @ORM\ManyToOne(targetEntity="Eccube\Entity\Product", inversedBy="CustomerFavoriteProducts")
  59.          * @ORM\JoinColumns({
  60.          *   @ORM\JoinColumn(name="product_id", referencedColumnName="id")
  61.          * })
  62.          */
  63.         private $Product;
  64.         /**
  65.          * Get id.
  66.          *
  67.          * @return int
  68.          */
  69.         public function getId()
  70.         {
  71.             return $this->id;
  72.         }
  73.         /**
  74.          * Set createDate.
  75.          *
  76.          * @param \DateTime $createDate
  77.          *
  78.          * @return CustomerFavoriteProduct
  79.          */
  80.         public function setCreateDate($createDate)
  81.         {
  82.             $this->create_date $createDate;
  83.             return $this;
  84.         }
  85.         /**
  86.          * Get createDate.
  87.          *
  88.          * @return \DateTime
  89.          */
  90.         public function getCreateDate()
  91.         {
  92.             return $this->create_date;
  93.         }
  94.         /**
  95.          * Set updateDate.
  96.          *
  97.          * @param \DateTime $updateDate
  98.          *
  99.          * @return CustomerFavoriteProduct
  100.          */
  101.         public function setUpdateDate($updateDate)
  102.         {
  103.             $this->update_date $updateDate;
  104.             return $this;
  105.         }
  106.         /**
  107.          * Get updateDate.
  108.          *
  109.          * @return \DateTime
  110.          */
  111.         public function getUpdateDate()
  112.         {
  113.             return $this->update_date;
  114.         }
  115.         /**
  116.          * Set customer.
  117.          *
  118.          * @param \Eccube\Entity\Customer|null $customer
  119.          *
  120.          * @return CustomerFavoriteProduct
  121.          */
  122.         public function setCustomer(Customer $customer null)
  123.         {
  124.             $this->Customer $customer;
  125.             return $this;
  126.         }
  127.         /**
  128.          * Get customer.
  129.          *
  130.          * @return \Eccube\Entity\Customer|null
  131.          */
  132.         public function getCustomer()
  133.         {
  134.             return $this->Customer;
  135.         }
  136.         /**
  137.          * Set product.
  138.          *
  139.          * @param \Eccube\Entity\Product|null $product
  140.          *
  141.          * @return CustomerFavoriteProduct
  142.          */
  143.         public function setProduct(Product $product null)
  144.         {
  145.             $this->Product $product;
  146.             return $this;
  147.         }
  148.         /**
  149.          * Get product.
  150.          *
  151.          * @return \Eccube\Entity\Product|null
  152.          */
  153.         public function getProduct()
  154.         {
  155.             return $this->Product;
  156.         }
  157.     }
  158. }