src/Eccube/Entity/ProductTag.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\ProductTag')) {
  15.     /**
  16.      * ProductTag
  17.      *
  18.      * @ORM\Table(name="dtb_product_tag")
  19.      * @ORM\InheritanceType("SINGLE_TABLE")
  20.      * @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
  21.      * @ORM\HasLifecycleCallbacks()
  22.      * @ORM\Entity(repositoryClass="Eccube\Repository\ProductTagRepository")
  23.      */
  24.     class ProductTag extends \Eccube\Entity\AbstractEntity
  25.     {
  26.         /**
  27.          * Get tag_id
  28.          * use csv export
  29.          *
  30.          * @return integer
  31.          */
  32.         public function getTagId()
  33.         {
  34.             if (empty($this->Tag)) {
  35.                 return null;
  36.             }
  37.             return $this->Tag->getId();
  38.         }
  39.         /**
  40.          * @var integer
  41.          *
  42.          * @ORM\Column(name="id", type="integer", options={"unsigned":true})
  43.          * @ORM\Id
  44.          * @ORM\GeneratedValue(strategy="IDENTITY")
  45.          */
  46.         private $id;
  47.         /**
  48.          * @var \DateTime
  49.          *
  50.          * @ORM\Column(name="create_date", type="datetimetz")
  51.          */
  52.         private $create_date;
  53.         /**
  54.          * @var \Eccube\Entity\Product
  55.          *
  56.          * @ORM\ManyToOne(targetEntity="Eccube\Entity\Product", inversedBy="ProductTag")
  57.          * @ORM\JoinColumns({
  58.          *   @ORM\JoinColumn(name="product_id", referencedColumnName="id")
  59.          * })
  60.          */
  61.         private $Product;
  62.         /**
  63.          * @var \Eccube\Entity\Tag
  64.          *
  65.          * @ORM\ManyToOne(targetEntity="Eccube\Entity\Tag", inversedBy="ProductTag")
  66.          * @ORM\JoinColumns({
  67.          *   @ORM\JoinColumn(name="tag_id", referencedColumnName="id")
  68.          * })
  69.          */
  70.         private $Tag;
  71.         /**
  72.          * @var \Eccube\Entity\Member
  73.          *
  74.          * @ORM\ManyToOne(targetEntity="Eccube\Entity\Member")
  75.          * @ORM\JoinColumns({
  76.          *   @ORM\JoinColumn(name="creator_id", referencedColumnName="id")
  77.          * })
  78.          */
  79.         private $Creator;
  80.         /**
  81.          * Get id.
  82.          *
  83.          * @return int
  84.          */
  85.         public function getId()
  86.         {
  87.             return $this->id;
  88.         }
  89.         /**
  90.          * Set createDate.
  91.          *
  92.          * @param \DateTime $createDate
  93.          *
  94.          * @return ProductTag
  95.          */
  96.         public function setCreateDate($createDate)
  97.         {
  98.             $this->create_date $createDate;
  99.             return $this;
  100.         }
  101.         /**
  102.          * Get createDate.
  103.          *
  104.          * @return \DateTime
  105.          */
  106.         public function getCreateDate()
  107.         {
  108.             return $this->create_date;
  109.         }
  110.         /**
  111.          * Set product.
  112.          *
  113.          * @param \Eccube\Entity\Product|null $product
  114.          *
  115.          * @return ProductTag
  116.          */
  117.         public function setProduct(Product $product null)
  118.         {
  119.             $this->Product $product;
  120.             return $this;
  121.         }
  122.         /**
  123.          * Get product.
  124.          *
  125.          * @return \Eccube\Entity\Product|null
  126.          */
  127.         public function getProduct()
  128.         {
  129.             return $this->Product;
  130.         }
  131.         /**
  132.          * Set tag.
  133.          *
  134.          * @param \Eccube\Entity\Tag|null $tag
  135.          *
  136.          * @return ProductTag
  137.          */
  138.         public function setTag(Tag $tag null)
  139.         {
  140.             $this->Tag $tag;
  141.             return $this;
  142.         }
  143.         /**
  144.          * Get tag.
  145.          *
  146.          * @return \Eccube\Entity\Tag|null
  147.          */
  148.         public function getTag()
  149.         {
  150.             return $this->Tag;
  151.         }
  152.         /**
  153.          * Set creator.
  154.          *
  155.          * @param \Eccube\Entity\Member|null $creator
  156.          *
  157.          * @return ProductTag
  158.          */
  159.         public function setCreator(Member $creator null)
  160.         {
  161.             $this->Creator $creator;
  162.             return $this;
  163.         }
  164.         /**
  165.          * Get creator.
  166.          *
  167.          * @return \Eccube\Entity\Member|null
  168.          */
  169.         public function getCreator()
  170.         {
  171.             return $this->Creator;
  172.         }
  173.     }
  174. }