src/Entity/EshopDelivery.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Gedmo\Mapping\Annotation as Gedmo;
  8. use Gedmo\Translatable\Translatable;
  9. /**
  10.  * @ORM\Entity(repositoryClass="App\EntityRepo\EshopDeliveryRepo")
  11.  * @ORM\Table(name="eshop_delivery")
  12.  * @Gedmo\TranslationEntity(class="App\Entity\EshopDeliveryTranslation")
  13.  */
  14. class EshopDelivery implements Translatable
  15. {
  16.     /**
  17.      * @ORM\Column(type="integer")
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue(strategy="AUTO")
  20.      */ 
  21.     private $eshopDeliveryId=0;   
  22.     /**
  23.      * @Gedmo\Translatable
  24.      * @ORM\Column(type="string", length=100, nullable=true)
  25.      */
  26.     protected $eshopDeliveryName;
  27.     /**
  28.      * Post locale
  29.      * Used locale to override Translation listener's locale
  30.      *
  31.      * @Gedmo\Locale
  32.      *
  33.      */
  34.     protected $locale;
  35.     /**
  36.      * @ORM\Column(type="integer", nullable=false)
  37.      */
  38.     protected $deliveryId=0;   
  39.     /**
  40.      * @ORM\Column(type="float", nullable=true)
  41.      */    
  42.     protected $cost;    
  43.     /**
  44.      * @ORM\Column(type="boolean", nullable=true)
  45.      */
  46.     protected $isActive;   
  47.     /**
  48.      * Many EshopDeliveries have Many EshopPayments.
  49.      * @ORM\ManyToMany(targetEntity="EshopPayment",cascade={"persist"})
  50.      * @ORM\JoinTable(name="eshop_delivery_eshop_payment",
  51.      *      joinColumns={@ORM\JoinColumn(name="eshop_delivery_id", referencedColumnName="eshop_delivery_id")},
  52.      *      inverseJoinColumns={@ORM\JoinColumn(name="eshop_payment_id", referencedColumnName="eshop_payment_id", unique=false)}
  53.      *      )
  54.      */
  55.     protected $eshopPayments;   
  56.     /**
  57.      * @ORM\Column(type="float", nullable=true)
  58.      */    
  59.     protected $enableFromOrderPrice;      
  60.     /**
  61.      * @ORM\Column(type="float", nullable=true)
  62.      */    
  63.     protected $enableToOrderPrice;     
  64.     /**
  65.      * @ORM\Column(type="string", length=255, nullable=true)
  66.      */
  67.     protected $logoUrl
  68.     /**
  69.      * @ORM\Column(type="float", nullable=true)
  70.      */  
  71.     protected $zeroCostLimit;      
  72.     /**
  73.      * @Gedmo\Translatable
  74.      * @ORM\Column(type="text", nullable=true)
  75.      */
  76.     protected $eshopDeliveryDescription;    
  77.     /**
  78.      * Get eshopDeliveryId
  79.      *
  80.      * @return integer
  81.      */
  82.     public function getEshopDeliveryId()
  83.     {
  84.         return $this->eshopDeliveryId;
  85.     }
  86.     /**
  87.      * Set eshopDeliveryName
  88.      *
  89.      * @param string $eshopDeliveryName
  90.      *
  91.      * @return EshopDelivery
  92.      */
  93.     public function setEshopDeliveryName($eshopDeliveryName)
  94.     {
  95.         $this->eshopDeliveryName $eshopDeliveryName;
  96.         return $this;
  97.     }
  98.     /**
  99.      * Get eshopDeliveryName
  100.      *
  101.      * @return string
  102.      */
  103.     public function getEshopDeliveryName()
  104.     {
  105.         return $this->eshopDeliveryName;
  106.     }
  107.     /**
  108.      * Set deliveryId
  109.      *
  110.      * @param integer $deliveryId
  111.      *
  112.      * @return EshopDelivery
  113.      */
  114.     public function setDeliveryId($deliveryId)
  115.     {
  116.         $this->deliveryId $deliveryId;
  117.         return $this;
  118.     }
  119.     /**
  120.      * Get deliveryId
  121.      *
  122.      * @return integer
  123.      */
  124.     public function getDeliveryId()
  125.     {
  126.         return $this->deliveryId;
  127.     }
  128.     /**
  129.      * Set cost
  130.      *
  131.      * @param float $cost
  132.      *
  133.      * @return EshopDelivery
  134.      */
  135.     public function setCost($cost)
  136.     {
  137.         $this->cost $cost;
  138.         return $this;
  139.     }
  140.     /**
  141.      * Get cost
  142.      *
  143.      * @return float
  144.      */
  145.     public function getCost()
  146.     {
  147.         return $this->cost;
  148.     }
  149.     /**
  150.      * Set locale
  151.      *
  152.      * @param string $locale
  153.      *
  154.      * @return Product
  155.      */
  156.     public function setLocale($locale)
  157.     {
  158.         $this->locale $locale;
  159.         return $this;
  160.     }
  161.     /**
  162.      * Get locale
  163.      *
  164.      * @return string
  165.      */
  166.     public function getLocale()
  167.     {
  168.         return $this->locale;
  169.     }
  170.     /**
  171.      * Set isActive
  172.      *
  173.      * @param boolean $isActive
  174.      *
  175.      * @return EshopDelivery
  176.      */
  177.     public function setIsActive($isActive)
  178.     {
  179.         $this->isActive $isActive;
  180.         return $this;
  181.     }
  182.     /**
  183.      * Get isActive
  184.      *
  185.      * @return boolean
  186.      */
  187.     public function getIsActive()
  188.     {
  189.         return $this->isActive;
  190.     }
  191.     /**
  192.      * Constructor
  193.      */
  194.     public function __construct()
  195.     {
  196.         $this->eshopPayments = new \Doctrine\Common\Collections\ArrayCollection();
  197.     }
  198.     /**
  199.      * Add eshopPayment
  200.      *
  201.      * @param \App\Entity\eshopPayment $eshopPayment
  202.      *
  203.      * @return EshopDelivery
  204.      */
  205.     public function addEshopPayment(\App\Entity\eshopPayment $eshopPayment)
  206.     {
  207.         $this->eshopPayments[] = $eshopPayment;
  208.         return $this;
  209.     }
  210.     /**
  211.      * Remove eshopPayment
  212.      *
  213.      * @param \App\Entity\eshopPayment $eshopPayment
  214.      */
  215.     public function removeEshopPayment(\App\Entity\eshopPayment $eshopPayment)
  216.     {
  217.         $this->eshopPayments->removeElement($eshopPayment);
  218.     }
  219.     /**
  220.      * Get eshopPayments
  221.      *
  222.      * @return \Doctrine\Common\Collections\Collection
  223.      */
  224.     public function getEshopPayments()
  225.     {
  226.         return $this->eshopPayments;
  227.     }
  228.     /**
  229.      * Set enableFromOrderPrice
  230.      *
  231.      * @param float $enableFromOrderPrice
  232.      *
  233.      * @return EshopDelivery
  234.      */
  235.     public function setEnableFromOrderPrice($enableFromOrderPrice)
  236.     {
  237.         $this->enableFromOrderPrice $enableFromOrderPrice;
  238.     }
  239.     /**
  240.      * Set zeroCostLimit
  241.      *
  242.      * @param float $zeroCostLimit
  243.      *
  244.      * @return EshopDelivery
  245.      */
  246.     public function setZeroCostLimit($zeroCostLimit)
  247.     {
  248.         $this->zeroCostLimit $zeroCostLimit;
  249.         return $this;
  250.     }
  251.     /**
  252.      * Get enableFromOrderPrice
  253.      *
  254.      * @return float
  255.      */
  256.     public function getEnableFromOrderPrice()
  257.     {
  258.         return $this->enableFromOrderPrice;
  259.     }
  260.     /**
  261.      * Set enableToOrderPrice
  262.      *
  263.      * @param float $enableToOrderPrice
  264.      *
  265.      * @return EshopDelivery
  266.      */
  267.     public function setEnableToOrderPrice($enableToOrderPrice)
  268.     {
  269.         $this->enableToOrderPrice $enableToOrderPrice;
  270.         return $this;
  271.     }
  272.     /**
  273.      * Get enableToOrderPrice
  274.      *
  275.      * @return float
  276.      */
  277.     public function getEnableToOrderPrice()
  278.     {
  279.         return $this->enableToOrderPrice;
  280.     }
  281.     /**
  282.      * Set logoUrl
  283.      *
  284.      * @param string $logoUrl
  285.      *
  286.      * @return EshopDelivery
  287.      */
  288.     public function setLogoUrl($logoUrl)
  289.     {
  290.         $this->logoUrl $logoUrl;
  291.         return $this;
  292.     }
  293.     /**
  294.      * Get logoUrl
  295.      *
  296.      * @return string
  297.      */
  298.     public function getLogoUrl()
  299.     {
  300.         return $this->logoUrl;
  301.     }
  302.     /**
  303.      * Get zeroCostLimit
  304.      *
  305.      * @return float
  306.      */
  307.     public function getZeroCostLimit()
  308.     {
  309.         return $this->zeroCostLimit;
  310.     }
  311.     /**
  312.      * Set eshopDeliveryDescription
  313.      *
  314.      * @param string $eshopDeliveryDescription
  315.      *
  316.      * @return EshopDelivery
  317.      */
  318.     public function setEshopDeliveryDescription($eshopDeliveryDescription)
  319.     {
  320.         $this->eshopDeliveryDescription $eshopDeliveryDescription;
  321.         return $this;
  322.     }
  323.     /**
  324.      * Get eshopDeliveryDescription
  325.      *
  326.      * @return string
  327.      */
  328.     public function getEshopDeliveryDescription()
  329.     {
  330.         return $this->eshopDeliveryDescription;
  331.     }
  332.     public function isIsActive(): ?bool
  333.     {
  334.         return $this->isActive;
  335.     }
  336. }