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.

Product.php 3.1KB

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