|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <?php
-
- namespace Lc\ShopBundle\Model ;
-
- use Lc\ShopBundle\Context\ReductionCatalogInterface;
- use Lc\ShopBundle\Context\UnitInterface;
-
- trait PriceTrait
- {
- /**
- * @ORM\Column(type="float", nullable=true)
- */
- protected $price;
-
- /**
- * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UnitInterface")
- * @ORM\JoinColumn(nullable=true)
- */
- protected $unit;
-
- /**
- * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\TaxRateInterface")
- * @ORM\JoinColumn(nullable=true)
- */
- protected $taxRate;
-
- public function getPriceInherited(): ?float
- {
- return $this->getPrice() ;
- }
-
- public function getUnitInherited(): ?Unit
- {
- return $this->getUnit() ;
- }
-
- public function getTaxRateInherited(): ?TaxRate
- {
- return $this->getTaxRate() ;
- }
-
-
- public function getPrice(): ?float
- {
- return $this->price;
- }
-
- public function setPrice(?float $price): self
- {
- $this->price = $price;
-
- return $this;
- }
-
- public function getUnit(): ?Unit
- {
- return $this->unit;
- }
-
- public function setUnit(Unit $unit): self
- {
- $this->unit = $unit;
-
- return $this;
- }
-
- public function getTaxRate(): ?TaxRate
- {
- return $this->taxRate;
- }
-
- public function setTaxRate(?TaxRate $taxRate): self
- {
- $this->taxRate = $taxRate;
-
- return $this;
- }
- }
|