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

130 行
3.0KB

  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 setBuyingPriceByRefUnit(?float $buyingPriceByRefUnit): self
  38. {
  39. $this->buyingPriceByRefUnit = $buyingPriceByRefUnit;
  40. return $this;
  41. }
  42. public function getPriceByRefUnit(): ?float
  43. {
  44. return $this->priceByRefUnit;
  45. }
  46. public function getPriceByRefUnitInherited(): ?float
  47. {
  48. return $this->getPriceByRefUnit();
  49. }
  50. public function setPriceByRefUnit(?float $priceByRefUnit): self
  51. {
  52. $this->priceByRefUnit = $priceByRefUnit;
  53. return $this;
  54. }
  55. public function getQuantity(): ?float
  56. {
  57. return $this->quantity;
  58. }
  59. public function setQuantity(?float $quantity): self
  60. {
  61. $this->quantity = $quantity;
  62. return $this;
  63. }
  64. public function getQuantityInherited(): ?float
  65. {
  66. return $this->getQuantity() ;
  67. }
  68. public function getAvailableQuantity(): ?float
  69. {
  70. return $this->availableQuantity;
  71. }
  72. public function setAvailableQuantity(?float $availableQuantity): self
  73. {
  74. $this->availableQuantity = $availableQuantity;
  75. return $this;
  76. }
  77. public function getAvailableQuantityDefault(): ?float
  78. {
  79. return $this->availableQuantityDefault;
  80. }
  81. public function setAvailableQuantityDefault(?float $availableQuantityDefault): self
  82. {
  83. $this->availableQuantityDefault = $availableQuantityDefault;
  84. return $this;
  85. }
  86. public function getPropertyExpirationDate(): ?string
  87. {
  88. return $this->propertyExpirationDate;
  89. }
  90. public function setPropertyExpirationDate(?string $propertyExpirationDate): self
  91. {
  92. $this->propertyExpirationDate = $propertyExpirationDate;
  93. return $this;
  94. }
  95. }