You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

133 lines
2.8KB

  1. <?php
  2. namespace Lc\ShopBundle\Model;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * @ORM\MappedSuperclass()
  6. */
  7. abstract class Product extends AbstractDocumentEntity
  8. {
  9. /**
  10. * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\ProductFamilyInterface", inversedBy="products")
  11. * @ORM\JoinColumn(nullable=false)
  12. */
  13. protected $productFamily;
  14. /**
  15. * @ORM\Column(type="float", nullable=true)
  16. */
  17. protected $price;
  18. /**
  19. * @ORM\Column(type="string", length=31, nullable=true)
  20. */
  21. protected $unit;
  22. /**
  23. * @ORM\Column(type="float", nullable=true)
  24. */
  25. protected $step;
  26. /**
  27. * @ORM\Column(type="float", nullable=true)
  28. */
  29. protected $weight;
  30. /**
  31. * @ORM\Column(type="float", nullable=true)
  32. */
  33. protected $availableQuantity;
  34. /**
  35. * @ORM\Column(type="float", nullable=true)
  36. */
  37. protected $stock;
  38. public function getProductFamily(): ?ProductFamily
  39. {
  40. return $this->productFamily;
  41. }
  42. public function setProductFamily(?ProductFamily $productFamily): self
  43. {
  44. $this->productFamily = $productFamily;
  45. return $this;
  46. }
  47. public function getPrice(): ?float
  48. {
  49. return $this->price;
  50. }
  51. public function setPrice(?float $price): self
  52. {
  53. $this->price = $price;
  54. return $this;
  55. }
  56. public function getUnit(): ?string
  57. {
  58. return $this->unit;
  59. }
  60. public function setUnit(?string $unit): self
  61. {
  62. $this->unit = $unit;
  63. return $this;
  64. }
  65. public function getStep(): ?float
  66. {
  67. return $this->step;
  68. }
  69. public function setStep(?float $step): self
  70. {
  71. $this->step = $step;
  72. return $this;
  73. }
  74. public function getWeight(): ?float
  75. {
  76. return $this->weight;
  77. }
  78. public function setWeight(?float $weight): self
  79. {
  80. $this->weight = $weight;
  81. return $this;
  82. }
  83. public function getAvailableQuantity(): ?float
  84. {
  85. return $this->availableQuantity;
  86. }
  87. public function setAvailableQuantity(?float $availableQuantity): self
  88. {
  89. $this->availableQuantity = $availableQuantity;
  90. return $this;
  91. }
  92. public function getStock(): ?float
  93. {
  94. return $this->stock;
  95. }
  96. public function setStock(?float $stock): self
  97. {
  98. $this->stock = $stock;
  99. return $this;
  100. }
  101. }