<?php
namespace App\Entity;
use App\Entity\File\File;
use App\Repository\OrderRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\HasLifecycleCallbacks
*/
class OrderEshop extends Order
{
/**
* @ORM\Column(type="string", length=32, nullable=true)
*/
private $companyName;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $goldAndSilverApiResponse;
/**
* @ORM\OneToMany(targetEntity=EshopBasket::class, mappedBy="eshopOrder")
*/
private $eshopBaskets;
/**
* @ORM\OneToMany(targetEntity=OrderEshopItem::class, mappedBy="orderEshop", orphanRemoval=true, cascade={"persist"})
*/
private $orderEshopItems;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $totalPriceExclVat;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $totalPriceVat;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $totalPriceInclVat;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $deliveryPrice;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $deliveryLabel;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $paymentPrice;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $paymentLabel;
public function __construct()
{
parent::__construct();
$this->eshopBaskets = new ArrayCollection();
$this->orderEshopItems = new ArrayCollection();
}
public function getGoldAndSilverApiResponse(): ?string
{
return $this->goldAndSilverApiResponse;
}
public function setGoldAndSilverApiResponse(?string $goldAndSilverApiResponse): self
{
$this->goldAndSilverApiResponse = $goldAndSilverApiResponse;
return $this;
}
/**
* @return Collection<int, EshopBasket>
*/
public function getEshopBaskets(): Collection
{
return $this->eshopBaskets;
}
public function addEshopBasket(EshopBasket $eshopBasket): self
{
if (!$this->eshopBaskets->contains($eshopBasket)) {
$this->eshopBaskets[] = $eshopBasket;
$eshopBasket->setEshopOrder($this);
}
return $this;
}
public function removeEshopBasket(EshopBasket $eshopBasket): self
{
if ($this->eshopBaskets->removeElement($eshopBasket)) {
// set the owning side to null (unless already changed)
if ($eshopBasket->getEshopOrder() === $this) {
$eshopBasket->setEshopOrder(null);
}
}
return $this;
}
/**
* @return Collection<int, OrderEshopItem>
*/
public function getOrderEshopItems(): Collection
{
return $this->orderEshopItems;
}
public function addOrderEshopItem(OrderEshopItem $orderEshopItem): self
{
if (!$this->orderEshopItems->contains($orderEshopItem)) {
$this->orderEshopItems[] = $orderEshopItem;
$orderEshopItem->setOrderEshop($this);
}
return $this;
}
public function removeOrderEshopItem(OrderEshopItem $orderEshopItem): self
{
if ($this->orderEshopItems->removeElement($orderEshopItem)) {
// set the owning side to null (unless already changed)
if ($orderEshopItem->getOrderEshop() === $this) {
$orderEshopItem->setOrderEshop(null);
}
}
return $this;
}
/**
* @return mixed
*/
public function getCompanyName()
{
return $this->companyName;
}
/**
* @param mixed $companyName
*/
public function setCompanyName($companyName): self
{
$this->companyName = $companyName;
return $this;
}
public function getTotalPriceExclVat(): ?float
{
return $this->totalPriceExclVat;
}
public function setTotalPriceExclVat(?float $totalPriceExclVat): self
{
$this->totalPriceExclVat = $totalPriceExclVat;
return $this;
}
public function getTotalPriceVat(): ?float
{
return $this->totalPriceVat;
}
public function setTotalPriceVat(?float $totalPriceVat): self
{
$this->totalPriceVat = $totalPriceVat;
return $this;
}
public function getTotalPriceInclVat(): ?float
{
return $this->totalPriceInclVat;
}
public function setTotalPriceInclVat(?float $totalPriceInclVat): self
{
$this->totalPriceInclVat = $totalPriceInclVat;
return $this;
}
public function getDeliveryPrice(): ?float
{
return $this->deliveryPrice;
}
public function setDeliveryPrice(?float $deliveryPrice): self
{
$this->deliveryPrice = $deliveryPrice;
return $this;
}
public function getDeliveryLabel(): ?string
{
return $this->deliveryLabel;
}
public function setDeliveryLabel(?string $deliveryLabel): self
{
$this->deliveryLabel = $deliveryLabel;
return $this;
}
public function getPaymentPrice(): ?float
{
return $this->paymentPrice;
}
public function setPaymentPrice(?float $paymentPrice): self
{
$this->paymentPrice = $paymentPrice;
return $this;
}
public function getPaymentLabel(): ?string
{
return $this->paymentLabel;
}
public function setPaymentLabel(?string $paymentLabel): self
{
$this->paymentLabel = $paymentLabel;
return $this;
}
}