<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Gedmo\Translatable\Translatable;
/**
* @ORM\Entity(repositoryClass="App\EntityRepo\EshopDeliveryRepo")
* @ORM\Table(name="eshop_delivery")
* @Gedmo\TranslationEntity(class="App\Entity\EshopDeliveryTranslation")
*/
class EshopDelivery implements Translatable
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $eshopDeliveryId=0;
/**
* @Gedmo\Translatable
* @ORM\Column(type="string", length=100, nullable=true)
*/
protected $eshopDeliveryName;
/**
* Post locale
* Used locale to override Translation listener's locale
*
* @Gedmo\Locale
*
*/
protected $locale;
/**
* @ORM\Column(type="integer", nullable=false)
*/
protected $deliveryId=0;
/**
* @ORM\Column(type="float", nullable=true)
*/
protected $cost;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
protected $isActive;
/**
* Many EshopDeliveries have Many EshopPayments.
* @ORM\ManyToMany(targetEntity="EshopPayment",cascade={"persist"})
* @ORM\JoinTable(name="eshop_delivery_eshop_payment",
* joinColumns={@ORM\JoinColumn(name="eshop_delivery_id", referencedColumnName="eshop_delivery_id")},
* inverseJoinColumns={@ORM\JoinColumn(name="eshop_payment_id", referencedColumnName="eshop_payment_id", unique=false)}
* )
*/
protected $eshopPayments;
/**
* @ORM\Column(type="float", nullable=true)
*/
protected $enableFromOrderPrice;
/**
* @ORM\Column(type="float", nullable=true)
*/
protected $enableToOrderPrice;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
protected $logoUrl;
/**
* @ORM\Column(type="float", nullable=true)
*/
protected $zeroCostLimit;
/**
* @Gedmo\Translatable
* @ORM\Column(type="text", nullable=true)
*/
protected $eshopDeliveryDescription;
/**
* Get eshopDeliveryId
*
* @return integer
*/
public function getEshopDeliveryId()
{
return $this->eshopDeliveryId;
}
/**
* Set eshopDeliveryName
*
* @param string $eshopDeliveryName
*
* @return EshopDelivery
*/
public function setEshopDeliveryName($eshopDeliveryName)
{
$this->eshopDeliveryName = $eshopDeliveryName;
return $this;
}
/**
* Get eshopDeliveryName
*
* @return string
*/
public function getEshopDeliveryName()
{
return $this->eshopDeliveryName;
}
/**
* Set deliveryId
*
* @param integer $deliveryId
*
* @return EshopDelivery
*/
public function setDeliveryId($deliveryId)
{
$this->deliveryId = $deliveryId;
return $this;
}
/**
* Get deliveryId
*
* @return integer
*/
public function getDeliveryId()
{
return $this->deliveryId;
}
/**
* Set cost
*
* @param float $cost
*
* @return EshopDelivery
*/
public function setCost($cost)
{
$this->cost = $cost;
return $this;
}
/**
* Get cost
*
* @return float
*/
public function getCost()
{
return $this->cost;
}
/**
* Set locale
*
* @param string $locale
*
* @return Product
*/
public function setLocale($locale)
{
$this->locale = $locale;
return $this;
}
/**
* Get locale
*
* @return string
*/
public function getLocale()
{
return $this->locale;
}
/**
* Set isActive
*
* @param boolean $isActive
*
* @return EshopDelivery
*/
public function setIsActive($isActive)
{
$this->isActive = $isActive;
return $this;
}
/**
* Get isActive
*
* @return boolean
*/
public function getIsActive()
{
return $this->isActive;
}
/**
* Constructor
*/
public function __construct()
{
$this->eshopPayments = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Add eshopPayment
*
* @param \App\Entity\eshopPayment $eshopPayment
*
* @return EshopDelivery
*/
public function addEshopPayment(\App\Entity\eshopPayment $eshopPayment)
{
$this->eshopPayments[] = $eshopPayment;
return $this;
}
/**
* Remove eshopPayment
*
* @param \App\Entity\eshopPayment $eshopPayment
*/
public function removeEshopPayment(\App\Entity\eshopPayment $eshopPayment)
{
$this->eshopPayments->removeElement($eshopPayment);
}
/**
* Get eshopPayments
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getEshopPayments()
{
return $this->eshopPayments;
}
/**
* Set enableFromOrderPrice
*
* @param float $enableFromOrderPrice
*
* @return EshopDelivery
*/
public function setEnableFromOrderPrice($enableFromOrderPrice)
{
$this->enableFromOrderPrice = $enableFromOrderPrice;
}
/**
* Set zeroCostLimit
*
* @param float $zeroCostLimit
*
* @return EshopDelivery
*/
public function setZeroCostLimit($zeroCostLimit)
{
$this->zeroCostLimit = $zeroCostLimit;
return $this;
}
/**
* Get enableFromOrderPrice
*
* @return float
*/
public function getEnableFromOrderPrice()
{
return $this->enableFromOrderPrice;
}
/**
* Set enableToOrderPrice
*
* @param float $enableToOrderPrice
*
* @return EshopDelivery
*/
public function setEnableToOrderPrice($enableToOrderPrice)
{
$this->enableToOrderPrice = $enableToOrderPrice;
return $this;
}
/**
* Get enableToOrderPrice
*
* @return float
*/
public function getEnableToOrderPrice()
{
return $this->enableToOrderPrice;
}
/**
* Set logoUrl
*
* @param string $logoUrl
*
* @return EshopDelivery
*/
public function setLogoUrl($logoUrl)
{
$this->logoUrl = $logoUrl;
return $this;
}
/**
* Get logoUrl
*
* @return string
*/
public function getLogoUrl()
{
return $this->logoUrl;
}
/**
* Get zeroCostLimit
*
* @return float
*/
public function getZeroCostLimit()
{
return $this->zeroCostLimit;
}
/**
* Set eshopDeliveryDescription
*
* @param string $eshopDeliveryDescription
*
* @return EshopDelivery
*/
public function setEshopDeliveryDescription($eshopDeliveryDescription)
{
$this->eshopDeliveryDescription = $eshopDeliveryDescription;
return $this;
}
/**
* Get eshopDeliveryDescription
*
* @return string
*/
public function getEshopDeliveryDescription()
{
return $this->eshopDeliveryDescription;
}
public function isIsActive(): ?bool
{
return $this->isActive;
}
}