選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

ProductPropertyTrait.php 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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. }