|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <?php
-
- namespace Lc\ShopBundle\Model;
-
- use App\Entity\OrderShop;
- use Doctrine\Common\Collections\ArrayCollection;
- use Doctrine\Common\Collections\Collection;
- use Doctrine\ORM\Mapping as ORM;
-
-
- abstract class DocumentQuotation extends AbstractDocumentOrder
- {
-
-
-
- protected $duration;
-
-
-
- protected $orderShops;
-
- public function __construct()
- {
- $this->orderShops = new ArrayCollection();
- }
-
- public function getDuration(): ?int
- {
- return $this->duration;
- }
-
- public function setDuration(?int $duration): self
- {
- $this->duration = $duration;
-
- return $this;
- }
-
-
-
- public function getOrderShops(): Collection
- {
- return $this->orderShops;
- }
-
- public function addOrderShop(OrderShop $orderShop): self
- {
- if (!$this->orderShops->contains($orderShop)) {
- $this->orderShops[] = $orderShop;
- $orderShop->setDocumentQuotation($this);
- }
-
- return $this;
- }
-
- public function removeOrderShop(OrderShop $orderShop): self
- {
- if ($this->orderShops->contains($orderShop)) {
- $this->orderShops->removeElement($orderShop);
-
- if ($orderShop->getDocumentQuotation() === $this) {
- $orderShop->setDocumentQuotation(null);
- }
- }
-
- return $this;
- }
- }
|