src/Entity/Idempiere/MProductCategory.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Idempiere;
  3. use App\Repository\Idempiere\MProductCategoryRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8. * @ORM\Entity(repositoryClass=MProductCategoryRepository::class)
  9. * @ORM\Table(name="m_product_category")
  10. */
  11. class MProductCategory
  12. {
  13. /**
  14. * @ORM\Id
  15. * @ORM\Column(type="integer")
  16. */
  17. private $m_product_category_id;
  18. /**
  19. * @ORM\Column(type="integer")
  20. */
  21. private $ad_client_id;
  22. /**
  23. * @ORM\Column(type="string", length=255)
  24. */
  25. private $name;
  26. /**
  27. * @ORM\Column(type="string", length=1)
  28. */
  29. private $isactive;
  30. /**
  31. * @ORM\Column(type="string", length=255)
  32. */
  33. private $value;
  34. /**
  35. * @ORM\OneToMany(targetEntity=MProduct::class, mappedBy="m_product_category")
  36. */
  37. private $m_product;
  38. /**
  39. * @ORM\Column(type="integer", nullable=true)
  40. */
  41. private $m_product_category_parent_id;
  42. /**
  43. * @ORM\OneToMany(targetEntity=SmCategoriaProductoMarca::class, mappedBy="m_product_category")
  44. */
  45. private $sm_categoria_producto_marca;
  46. public function __construct()
  47. {
  48. $this->m_product = new ArrayCollection();
  49. $this->sm_categoria_producto_marca = new ArrayCollection();
  50. }
  51. public function getId(): ?int
  52. {
  53. return $this->getMProductCategoryId();
  54. }
  55. public function getMProductCategoryId(): ?int
  56. {
  57. return $this->m_product_category_id;
  58. }
  59. public function setMProductCategoryId(int $m_product_category_id): self
  60. {
  61. $this->m_product_category_id = $m_product_category_id;
  62. return $this;
  63. }
  64. public function getAdClientId(): ?int
  65. {
  66. return $this->ad_client_id;
  67. }
  68. public function setAdClientId(int $ad_client_id): self
  69. {
  70. $this->ad_client_id = $ad_client_id;
  71. return $this;
  72. }
  73. public function getName(): ?string
  74. {
  75. return $this->name;
  76. }
  77. public function setName(string $name): self
  78. {
  79. $this->name = $name;
  80. return $this;
  81. }
  82. public function getIsactive(): ?string
  83. {
  84. return $this->isactive;
  85. }
  86. public function setIsactive(string $isactive): self
  87. {
  88. $this->isactive = $isactive;
  89. return $this;
  90. }
  91. public function getValue(): ?string
  92. {
  93. return $this->value;
  94. }
  95. public function setValue(string $value): self
  96. {
  97. $this->value = $value;
  98. return $this;
  99. }
  100. /**
  101. * @return Collection|MProduct[]
  102. */
  103. public function getMProduct(): Collection
  104. {
  105. return $this->m_product;
  106. }
  107. public function addMProduct(MProduct $mProduct): self
  108. {
  109. if (!$this->m_product->contains($mProduct)) {
  110. $this->m_product[] = $mProduct;
  111. $mProduct->setMProductCategory($this);
  112. }
  113. return $this;
  114. }
  115. public function removeMProduct(MProduct $mProduct): self
  116. {
  117. if ($this->m_product->removeElement($mProduct)) {
  118. // set the owning side to null (unless already changed)
  119. if ($mProduct->getMProductCategory() === $this) {
  120. $mProduct->setMProductCategory(null);
  121. }
  122. }
  123. return $this;
  124. }
  125. public function getMProductCategoryParentId(): ?int
  126. {
  127. return $this->m_product_category_parent_id;
  128. }
  129. public function setMProductCategoryParentId(?int $m_product_category_parent_id): self
  130. {
  131. $this->m_product_category_parent_id = $m_product_category_parent_id;
  132. return $this;
  133. }
  134. }