Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

132 lines
3.2KB

  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 $buyingPriceByRefUnit;
  13. /**
  14. * @ORM\Column(type="float", nullable=true)
  15. */
  16. protected $priceByRefUnit;
  17. /**
  18. * @ORM\Column(type="float", nullable=true)
  19. */
  20. protected $quantity;
  21. /**
  22. * @ORM\Column(type="float", nullable=true)
  23. */
  24. protected $availableQuantity;
  25. /**
  26. * @ORM\Column(type="float", nullable=true)
  27. */
  28. protected $availableQuantityDefault;
  29. /**
  30. * @ORM\Column(type="string", length=255, nullable=true)
  31. */
  32. protected $propertyExpirationDate;
  33. public function getBuyingPriceByRefUnit(): ?float
  34. {
  35. return $this->buyingPriceByRefUnit;
  36. }
  37. public function getBuyingPriceByRefUnitInherited(): ?float
  38. {
  39. return $this->getBuyingPriceByRefUnit() ;
  40. }
  41. public function setBuyingPriceByRefUnit(?float $buyingPriceByRefUnit): self
  42. {
  43. $this->buyingPriceByRefUnit = $buyingPriceByRefUnit;
  44. return $this;
  45. }
  46. public function getPriceByRefUnit(): ?float
  47. {
  48. return $this->priceByRefUnit;
  49. }
  50. public function getPriceByRefUnitInherited(): ?float
  51. {
  52. return $this->getPriceByRefUnit();
  53. }
  54. public function setPriceByRefUnit(?float $priceByRefUnit): self
  55. {
  56. $this->priceByRefUnit = $priceByRefUnit;
  57. return $this;
  58. }
  59. public function getQuantity(): ?float
  60. {
  61. return $this->quantity;
  62. }
  63. public function setQuantity(?float $quantity): self
  64. {
  65. $this->quantity = $quantity;
  66. return $this;
  67. }
  68. public function getQuantityInherited(): ?float
  69. {
  70. return $this->getQuantity() ;
  71. }
  72. public function getAvailableQuantity(): ?float
  73. {
  74. return $this->availableQuantity;
  75. }
  76. public function setAvailableQuantity(?float $availableQuantity): self
  77. {
  78. $this->availableQuantity = $availableQuantity;
  79. return $this;
  80. }
  81. public function getAvailableQuantityDefault(): ?float
  82. {
  83. return $this->availableQuantityDefault;
  84. }
  85. public function setAvailableQuantityDefault(?float $availableQuantityDefault): self
  86. {
  87. $this->availableQuantityDefault = $availableQuantityDefault;
  88. return $this;
  89. }
  90. public function getPropertyExpirationDate(): ?string
  91. {
  92. return $this->propertyExpirationDate;
  93. }
  94. public function setPropertyExpirationDate(?string $propertyExpirationDate): self
  95. {
  96. $this->propertyExpirationDate = $propertyExpirationDate;
  97. return $this;
  98. }
  99. }