app/proxy/entity/src/Eccube/Entity/ProductCategory.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. /**
  15. * ProductCategory
  16. *
  17. * @ORM\Table(name="dtb_product_category")
  18. * @ORM\InheritanceType("SINGLE_TABLE")
  19. * @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
  20. * @ORM\HasLifecycleCallbacks()
  21. * @ORM\Entity(repositoryClass="Eccube\Repository\ProductCategoryRepository")
  22. */
  23. class ProductCategory extends \Eccube\Entity\AbstractEntity
  24. {
  25. use \Customize\Entity\ProductCategoryTrait;
  26. /**
  27. * @var int
  28. *
  29. * @ORM\Column(name="product_id", type="integer", options={"unsigned":true})
  30. * @ORM\Id
  31. * @ORM\GeneratedValue(strategy="NONE")
  32. */
  33. private $product_id;
  34. /**
  35. * @var int
  36. *
  37. * @ORM\Column(name="category_id", type="integer", options={"unsigned":true})
  38. * @ORM\Id
  39. * @ORM\GeneratedValue(strategy="NONE")
  40. */
  41. private $category_id;
  42. /**
  43. * @var \Eccube\Entity\Product
  44. *
  45. * @ORM\ManyToOne(targetEntity="Eccube\Entity\Product", inversedBy="ProductCategories")
  46. * @ORM\JoinColumns({
  47. * @ORM\JoinColumn(name="product_id", referencedColumnName="id")
  48. * })
  49. */
  50. private $Product;
  51. /**
  52. * @var \Eccube\Entity\Category
  53. *
  54. * @ORM\ManyToOne(targetEntity="Eccube\Entity\Category", inversedBy="ProductCategories")
  55. * @ORM\JoinColumns({
  56. * @ORM\JoinColumn(name="category_id", referencedColumnName="id")
  57. * })
  58. */
  59. private $Category;
  60. /**
  61. * Set productId.
  62. *
  63. * @param int $productId
  64. *
  65. * @return ProductCategory
  66. */
  67. public function setProductId($productId)
  68. {
  69. $this->product_id = $productId;
  70. return $this;
  71. }
  72. /**
  73. * Get productId.
  74. *
  75. * @return int
  76. */
  77. public function getProductId()
  78. {
  79. return $this->product_id;
  80. }
  81. /**
  82. * Set categoryId.
  83. *
  84. * @param int $categoryId
  85. *
  86. * @return ProductCategory
  87. */
  88. public function setCategoryId($categoryId)
  89. {
  90. $this->category_id = $categoryId;
  91. return $this;
  92. }
  93. /**
  94. * Get categoryId.
  95. *
  96. * @return int
  97. */
  98. public function getCategoryId()
  99. {
  100. return $this->category_id;
  101. }
  102. /**
  103. * Set product.
  104. *
  105. * @param \Eccube\Entity\Product|null $product
  106. *
  107. * @return ProductCategory
  108. */
  109. public function setProduct(Product $product = null)
  110. {
  111. $this->Product = $product;
  112. return $this;
  113. }
  114. /**
  115. * Get product.
  116. *
  117. * @return \Eccube\Entity\Product|null
  118. */
  119. public function getProduct()
  120. {
  121. return $this->Product;
  122. }
  123. /**
  124. * Set category.
  125. *
  126. * @param \Eccube\Entity\Category|null $category
  127. *
  128. * @return ProductCategory
  129. */
  130. public function setCategory(Category $category = null)
  131. {
  132. $this->Category = $category;
  133. return $this;
  134. }
  135. /**
  136. * Get category.
  137. *
  138. * @return \Eccube\Entity\Category|null
  139. */
  140. public function getCategory()
  141. {
  142. return $this->Category;
  143. }
  144. }