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.

105 lines
2.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 $quantity;
  17. /**
  18. * @ORM\Column(type="float", nullable=true)
  19. */
  20. protected $availableQuantity;
  21. /**
  22. * @ORM\Column(type="float", nullable=true)
  23. */
  24. protected $availableQuantityDefault;
  25. /**
  26. * @ORM\Column(type="date", nullable=true)
  27. */
  28. protected $propertyExpirationDate;
  29. public function getBuyingPrice(): ?float
  30. {
  31. return $this->buyingPrice;
  32. }
  33. public function setBuyingPrice(?float $buyingPrice): self
  34. {
  35. $this->buyingPrice = $buyingPrice;
  36. return $this;
  37. }
  38. public function getQuantity(): ?float
  39. {
  40. return $this->quantity;
  41. }
  42. public function setQuantity(?float $quantity): self
  43. {
  44. $this->quantity = $quantity;
  45. return $this;
  46. }
  47. public function getQuantityInherited(): ?float
  48. {
  49. return $this->getQuantity() ;
  50. }
  51. public function getAvailableQuantity(): ?float
  52. {
  53. return $this->availableQuantity;
  54. }
  55. public function setAvailableQuantity(?float $availableQuantity): self
  56. {
  57. $this->availableQuantity = $availableQuantity;
  58. return $this;
  59. }
  60. public function getAvailableQuantityDefault(): ?float
  61. {
  62. return $this->availableQuantityDefault;
  63. }
  64. public function setAvailableQuantityDefault(?float $availableQuantityDefault): self
  65. {
  66. $this->availableQuantityDefault = $availableQuantityDefault;
  67. return $this;
  68. }
  69. public function getPropertyExpirationDate(): ?\DateTimeInterface
  70. {
  71. return $this->propertyExpirationDate;
  72. }
  73. public function setPropertyExpirationDate(?\DateTimeInterface $propertyExpirationDate): self
  74. {
  75. $this->propertyExpirationDate = $propertyExpirationDate;
  76. return $this;
  77. }
  78. }