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.

137 lines
2.9KB

  1. <?php
  2. namespace Lc\ShopBundle\Model;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. trait ProductPropertyTrait
  6. {
  7. /**
  8. * @ORM\Column(type="float", nullable=true)
  9. */
  10. protected $price;
  11. /**
  12. * @ORM\Column(type="float", nullable=true)
  13. */
  14. protected $buyingPrice;
  15. /**
  16. * @ORM\Column(type="string", length=31, nullable=true)
  17. */
  18. protected $unit;
  19. /**
  20. * @ORM\Column(type="float", nullable=true)
  21. */
  22. protected $quantity;
  23. /**
  24. * @ORM\Column(type="float", nullable=true)
  25. */
  26. protected $availableQuantity;
  27. /**
  28. * @ORM\Column(type="float", nullable=true)
  29. */
  30. protected $availableQuantityDefault;
  31. /**
  32. * @ORM\Column(type="date", nullable=true)
  33. */
  34. protected $expirationDate;
  35. public function getUnit(): ?string
  36. {
  37. return $this->unit;
  38. }
  39. public function setUnit(?string $unit): self
  40. {
  41. $this->unit = $unit;
  42. return $this;
  43. }
  44. public function getPrice(): ?float
  45. {
  46. return $this->price;
  47. }
  48. public function setPrice(?float $price): self
  49. {
  50. $this->price = $price;
  51. return $this;
  52. }
  53. public function getBuyingPrice(): ?float
  54. {
  55. return $this->buyingPrice;
  56. }
  57. public function setBuyingPrice(?float $buyingPrice): self
  58. {
  59. $this->buyingPrice = $buyingPrice;
  60. return $this;
  61. }
  62. public function getQuantity(): ?float
  63. {
  64. return $this->quantity;
  65. }
  66. public function setQuantity(?float $quantity): self
  67. {
  68. $this->quantity = $quantity;
  69. return $this;
  70. }
  71. public function getAvailableQuantity(): ?float
  72. {
  73. return $this->availableQuantity;
  74. }
  75. public function setAvailableQuantity(?float $availableQuantity): self
  76. {
  77. $this->availableQuantity = $availableQuantity;
  78. return $this;
  79. }
  80. public function getAvailableQuantityDefault(): ?float
  81. {
  82. return $this->availableQuantityDefault;
  83. }
  84. public function setAvailableQuantityDefault(?float $availableQuantityDefault): self
  85. {
  86. $this->availableQuantityDefault = $availableQuantityDefault;
  87. return $this;
  88. }
  89. public function getExpirationDate(): ?\DateTimeInterface
  90. {
  91. return $this->expirationDate;
  92. }
  93. public function setExpirationDate(?\DateTimeInterface $expirationDate): self
  94. {
  95. $this->expirationDate = $expirationDate;
  96. return $this;
  97. }
  98. }