|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
- <?php
-
- namespace Lc\CaracoleBundle\Model\Order;
-
- use Lc\CaracoleBundle\Doctrine\Extension\PriceTrait;
- use Doctrine\ORM\Mapping as ORM;
- use Lc\CaracoleBundle\Doctrine\Extension\PriceInterface;
- use Lc\CaracoleBundle\Model\Product\ProductInterface;
- use Lc\SovBundle\Doctrine\EntityInterface;
-
-
- abstract class OrderProductModel implements PriceInterface, EntityInterface, OrderProductInterface
- {
- use PriceTrait;
-
-
-
- protected $orderShop;
-
-
-
- protected $product;
-
-
-
- protected $quantityOrder;
-
-
-
- protected $quantityProduct;
-
-
-
- protected $title;
-
-
-
- protected $orderProductReductionCatalog;
-
- public function __toString()
- {
- if ($this->getTitle()) {
- return $this->getTitle();
- } else {
- return $this->getProduct()->getProductFamily()->getTitle() . ' - ' . $this->getProduct()->getTitle();
- }
- }
-
-
-
-
-
-
-
-
-
-
- public function getOrderShop(): ?OrderShopInterface
- {
- return $this->orderShop;
- }
-
- public function setOrderShop(?OrderShopInterface $orderShop): self
- {
- $this->orderShop = $orderShop;
-
- return $this;
- }
-
- public function getProduct(): ?ProductInterface
- {
- return $this->product;
- }
-
- public function setProduct(?ProductInterface $product): self
- {
- $this->product = $product;
-
- return $this;
- }
-
- public function getQuantityOrder(): ?int
- {
- return $this->quantityOrder;
- }
-
- public function setQuantityOrder(int $quantityOrder): self
- {
- $this->quantityOrder = $quantityOrder;
-
- return $this;
- }
-
- public function getQuantityProduct(): ?float
- {
- return $this->quantityProduct;
- }
-
- public function setQuantityProduct(float $quantityProduct): self
- {
- $this->quantityProduct = $quantityProduct;
-
- return $this;
- }
-
- public function getTitle(): ?string
- {
- return $this->title;
- }
-
- public function setTitle(string $title): self
- {
- $this->title = $title;
-
- return $this;
- }
-
- public function getOrderProductReductionCatalog(): ?OrderProductReductionCatalogInterface
- {
- return $this->orderProductReductionCatalog;
- }
-
- public function setOrderProductReductionCatalog(?OrderProductReductionCatalogInterface $orderProductReductionCatalog): self
- {
- $this->orderProductReductionCatalog = $orderProductReductionCatalog;
-
- return $this;
- }
-
-
- }
|