src/Entity/System/ProductPack.php line 14

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity\System;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Table(name="ps_product_pack")
  7. *
  8. * @ORM\Entity(repositoryClass="App\Repository\System\ProductPackRepository")
  9. */
  10. class ProductPack
  11. {
  12. /**
  13. * @ORM\Id
  14. *
  15. * @ORM\ManyToOne(targetEntity="App\Entity\System\Product")
  16. *
  17. * @ORM\JoinColumn(name="id_product_pack", referencedColumnName="id_product", )
  18. */
  19. protected Product $product;
  20. /**
  21. * @ORM\Id
  22. *
  23. * @ORM\ManyToOne(targetEntity="App\Entity\System\ProductAttribute")
  24. *
  25. * @ORM\JoinColumn(name="id_product_attribute_pack", referencedColumnName="id_product_attribute")
  26. */
  27. protected ?ProductAttribute $productAttribute;
  28. /**
  29. * @ORM\Id
  30. *
  31. * @ORM\Column(type="integer", length=10, name="id_product_item", options={"default":0})
  32. */
  33. protected int $productItemId;
  34. /**
  35. * @ORM\Id
  36. *
  37. * @ORM\Column(type="integer", length=10, name="id_product_attribute_item", options={"default":0})
  38. */
  39. protected int $productAttributeItemId;
  40. /**
  41. * @deprecated
  42. *
  43. * @ORM\Column(type="integer", options={"default": 1})
  44. */
  45. protected int $quantityItem;
  46. public function getProduct(): Product
  47. {
  48. return $this->product;
  49. }
  50. public function setProductId(Product $product): ProductPack
  51. {
  52. $this->product = $product;
  53. return $this;
  54. }
  55. public function getProductAttribute(): ProductAttribute
  56. {
  57. return $this->productAttribute;
  58. }
  59. public function setProductAttribute(ProductAttribute $productAttribute): ProductPack
  60. {
  61. $this->productAttribute = $productAttribute;
  62. return $this;
  63. }
  64. public function getProductItemId(): int
  65. {
  66. return $this->productItemId;
  67. }
  68. public function setProductItemId(int $productItemId): ProductPack
  69. {
  70. $this->productItemId = $productItemId;
  71. return $this;
  72. }
  73. public function getProductAttributeItemId(): int
  74. {
  75. return $this->productAttributeItemId;
  76. }
  77. public function setProductAttributeItemId(int $productAttributeItemId): ProductPack
  78. {
  79. $this->productAttributeItemId = $productAttributeItemId;
  80. return $this;
  81. }
  82. }