app/Plugin/CMBlogPro42/Entity/BlogProduct.php line 16

Open in your IDE?
  1. <?php
  2. namespace Plugin\CMBlogPro42\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * BlogProduct
  6.  *
  7.  * @ORM\Table(name="plg_blog_blog_product")
  8.  * @ORM\InheritanceType("SINGLE_TABLE")
  9.  * @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
  10.  * @ORM\HasLifecycleCallbacks()
  11.  * @ORM\Entity(repositoryClass="Plugin\CMBlogPro42\Repository\BlogProductRepository")
  12.  */
  13. class BlogProduct
  14. {
  15.     
  16.     /** ymk
  17.      * @var int
  18.      *
  19.      * @ORM\Column(name="id", type="integer", options={"unsigned":true})
  20.      * @ORM\Id
  21.      * @ORM\GeneratedValue(strategy="IDENTITY")
  22.      */
  23.     private $id;
  24.     /**
  25.      * @var \Plugin\CMBlogPro42\Entity\Blog
  26.      *
  27.      * @ORM\ManyToOne(targetEntity="Plugin\CMBlogPro42\Entity\Blog", inversedBy="BlogProduct")
  28.      * @ORM\JoinColumns({
  29.      *   @ORM\JoinColumn(name="blog_id", referencedColumnName="id")
  30.      * })
  31.      */
  32.     private $Blog;
  33.     /**
  34.      * @var \Eccube\Entity\Product
  35.      *
  36.      * @ORM\ManyToOne(targetEntity="Eccube\Entity\Product", inversedBy="BlogProduct")
  37.      * @ORM\JoinColumns({
  38.      *   @ORM\JoinColumn(name="product_id", referencedColumnName="id")
  39.      * })
  40.      */
  41.     private $Product;
  42.     /** ymk
  43.      * Get id.
  44.      * 
  45.      * @return int
  46.      */
  47.     public function getId()
  48.     {
  49.         return $this->id;
  50.     }
  51.     /**
  52.      * Set blog.
  53.      *
  54.      * @param \Plugin\CMBlogPro42\Entity\Blog|null $blog
  55.      *
  56.      * @return BlogProduct
  57.      */
  58.     public function setBlog(\Plugin\CMBlogPro42\Entity\Blog $blog null)
  59.     {
  60.         $this->Blog $blog;
  61.         return $this;
  62.     }
  63.     /**
  64.      * Get blog.
  65.      *
  66.      * @return \Plugin\CMBlogPro42\Entity\Blog|null
  67.      */
  68.     public function getBlog()
  69.     {
  70.         return $this->Blog;
  71.     }
  72.     /**
  73.      * Set product.
  74.      *
  75.      * @param \Eccube\Entity\Product|null $product
  76.      *
  77.      * @return BlogProduct
  78.      */
  79.     public function setProduct(\Eccube\Entity\Product $product null)
  80.     {
  81.         $this->Product $product;
  82.         return $this;
  83.     }
  84.     /**
  85.      * Get product.
  86.      *
  87.      * @return \Eccube\Entity\Product|null
  88.      */
  89.     public function getProduct()
  90.     {
  91.         return $this->Product;
  92.     }
  93. }