src/Entity/System/FeatureProduct.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * Tag
  6. *
  7. * @ORM\Table(name="feature_product", indexes={
  8. *
  9. * @ORM\Index(name="feature_product_is_filter_index", columns={"is_filter"})
  10. * })
  11. *
  12. * @ORM\Entity(repositoryClass="App\Repository\System\FeatureProductRepository")
  13. */
  14. class FeatureProduct
  15. {
  16. /**
  17. * @var Feature
  18. *
  19. * @ORM\Id()
  20. *
  21. * @ORM\ManyToOne(targetEntity="App\Entity\System\Feature", inversedBy="featureProducts")
  22. *
  23. * @ORM\JoinColumn(name="feature_id", referencedColumnName="id")
  24. */
  25. private $feature;
  26. /**
  27. * @var Product
  28. *
  29. * @ORM\Id()
  30. *
  31. * @ORM\ManyToOne(targetEntity="App\Entity\System\Product", inversedBy="featureProducts")
  32. *
  33. * @ORM\JoinColumn(name="product_id", referencedColumnName="id_product")
  34. */
  35. private $product;
  36. /**
  37. * @var bool
  38. *
  39. * @ORM\Column(type="boolean")
  40. */
  41. private $isFilter;
  42. public function __construct()
  43. {
  44. $this->isFilter = false;
  45. }
  46. public function getFeature(): Feature
  47. {
  48. return $this->feature;
  49. }
  50. public function setFeature(Feature $feature): FeatureProduct
  51. {
  52. $this->feature = $feature;
  53. return $this;
  54. }
  55. public function getProduct(): Product
  56. {
  57. return $this->product;
  58. }
  59. public function setProduct(Product $product): FeatureProduct
  60. {
  61. $this->product = $product;
  62. return $this;
  63. }
  64. public function getIsFilter(): bool
  65. {
  66. return $this->isFilter;
  67. }
  68. public function setIsFilter(bool $isFilter): FeatureProduct
  69. {
  70. $this->isFilter = $isFilter;
  71. return $this;
  72. }
  73. }