|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- <?php
-
- namespace Lc\CaracoleBundle\Doctrine\Extension;
-
- use Lc\CaracoleBundle\Model\Common\TaxRateInterface;
- use Lc\CaracoleBundle\Model\Common\UnitInterface;
-
- trait PriceTrait
- {
- /**
- * @ORM\Column(type="float", nullable=true)
- */
- protected $price;
-
- /**
- * @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Common\UnitInterface")
- * @ORM\JoinColumn(nullable=true)
- */
- protected $unit;
-
- /**
- * @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Common\TaxRateInterface")
- * @ORM\JoinColumn(nullable=true)
- */
- protected $taxRate;
-
-
- /**
- * @ORM\Column(type="float", nullable=true)
- */
- protected $buyingPrice;
-
-
- public function getPriceInherited(): ?float
- {
- return $this->getPrice();
- }
-
- public function getUnitInherited(): ?UnitInterface
- {
- return $this->getUnit();
- }
-
- public function getTaxRateInherited(): ?TaxRateInterface
- {
- return $this->getTaxRate();
- }
-
- public function getBuyingPriceInherited(): ?float
- {
- return $this->getBuyingPrice();
- }
-
- public function getBuyingPrice(): ?float
- {
- return $this->buyingPrice;
- }
-
- public function setBuyingPrice(?float $buyingPrice): self
- {
- $this->buyingPrice = $buyingPrice;
-
- return $this;
- }
-
- public function getPrice(): ?float
- {
- return $this->price;
- }
-
- public function setPrice(?float $price): self
- {
- $this->price = $price;
-
- return $this;
- }
-
- public function getUnit(): ?UnitInterface
- {
- return $this->unit;
- }
-
- public function setUnit(?UnitInterface $unit): self
- {
- $this->unit = $unit;
-
- return $this;
- }
-
- public function getTaxRate(): ?TaxRateInterface
- {
- return $this->taxRate;
- }
-
- public function setTaxRate(?TaxRateInterface $taxRate): self
- {
- $this->taxRate = $taxRate;
-
- return $this;
- }
- }
|