145 lines
3.4KB

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