src/Entity/Eshop.php line 24

Open in your IDE?
  1. <?php
  2. /**
  3.  * Eshop class represents model of EasyCommerc Eshop entity
  4.  *
  5.  * $Project: Alliancemarkets2 $
  6.  * $Id$
  7.  *
  8.  * @package alliancemarkets2
  9.  * @author George Matyas <webexciter@yahoo.com>
  10.  * @version $Revision$
  11.  */
  12. namespace App\Entity;
  13. use Doctrine\Common\Collections\ArrayCollection;
  14. use Doctrine\Common\Collections\Collection;
  15. use Doctrine\DBAL\Types\Types;
  16. use Doctrine\ORM\Mapping as ORM;
  17. /**
  18.  * @ORM\Entity(repositoryClass="App\EntityRepo\EshopRepo")
  19.  * @ORM\Table(name="eshop")
  20.  */
  21. class Eshop
  22. {
  23.     /**
  24.      * @ORM\Column(type="integer")
  25.      * @ORM\Id
  26.      * @ORM\GeneratedValue(strategy="AUTO")
  27.      */ 
  28.     protected $eshopId=0;
  29.     
  30.     /**
  31.      * @ORM\Column(type="string", length=100)
  32.      */
  33.     protected $eshopName;    
  34.     /**
  35.      * @ORM\Column(type="integer")
  36.      */
  37.     protected $userId=0;    
  38.     /*
  39.      * Many Eshops have Many Users.
  40.      * @ORM\ManyToOne(targetEntity="User",cascade={"persist"})
  41.      * @ORM\JoinTable(name="eshop_user",
  42.      *      joinColumns={@ORM\JoinColumn(name="user_id", referencedColumnName="user_id", unique=true)},
  43.      *      inverseJoinColumns={@ORM\JoinColumn(name="eshop_id", referencedColumnName="eshop_id", unique=true)}
  44.      *      )
  45.      */
  46.     //protected $user;    
  47.     
  48.     
  49.     /**
  50.      * @ORM\Column(type="string", length=100, nullable=true)
  51.      */
  52.     protected $eshopType='eshop';
  53.     
  54.     /**
  55.      * @ORM\Column(type="integer", nullable=true)
  56.      */
  57.     protected $priority=1;   
  58.     
  59.     /**
  60.      * @ORM\Column(type="string", length=100, nullable=true)
  61.      */
  62.     protected $status='new';    
  63.     
  64.     /**
  65.      * @ORM\Column(type="date", nullable=true)
  66.      */
  67.     protected $dateInserted;
  68.     
  69.     /**
  70.      * @ORM\Column(type="date", nullable=true)
  71.      */
  72.     protected $dateLastControl;    
  73.     
  74.     /**
  75.      * @ORM\Column(type="string", length=255, nullable=true)
  76.      */
  77.     protected $logoUrl;    
  78.     
  79.     /**
  80.      * @ORM\Column(type="text", nullable=true)
  81.      */
  82.     protected $notes;    
  83.     
  84.     /**
  85.      * @ORM\Column(type="integer", nullable=true)
  86.      */
  87.     protected $adminUserId=0;    
  88.     
  89.     /**
  90.      * @ORM\Column(type="string", length=255, nullable=true)
  91.      */
  92.     protected $eshopEmail;    
  93.     
  94.     /**
  95.      * @ORM\Column(type="string", length=255, nullable=true)
  96.      */
  97.     protected $orderEmail
  98.     
  99.     /**
  100.      * @ORM\Column(type="integer", nullable=true)
  101.      */
  102.     protected $eshopPrice;
  103.   
  104.     /**
  105.      * @ORM\Column(type="boolean", nullable=true)
  106.      */
  107.     protected $eshopCurrent;    
  108.     
  109.     /**
  110.      * @ORM\Column(type="string", length=255, nullable=true)
  111.      */
  112.     protected $eshopCss;
  113.     /*
  114.      * @ORM\OneToMany(targetEntity=Language::class, mappedBy="eshop")
  115.      */
  116.     /**
  117.      * Many Eshops have Many Languages.
  118.      * @ORM\ManyToMany(targetEntity="Language",cascade={"persist"})
  119.      * @ORM\JoinTable(name="eshop_language",
  120.      *      joinColumns={@ORM\JoinColumn(name="eshop_id", referencedColumnName="eshop_id")},
  121.      *      inverseJoinColumns={@ORM\JoinColumn(name="lang_id", referencedColumnName="lang_id", unique=false)}
  122.      *      )
  123.      */
  124.     private $languages;
  125.     /*
  126.      * Many Eshops have Many Languages.
  127.      * @ORM\ManyToMany(targetEntity=Language::class,cascade={"persist"})
  128.      * @ORM\JoinTable(name="eshop_language",
  129.      *      joinColumns={@ORM\JoinColumn(name="eshop_id", referencedColumnName="eshop_id")},
  130.      *      inverseJoinColumns={@ORM\JoinColumn(name="lang_id", referencedColumnName="lang_id", unique=false)}
  131.      *      )
  132.      */
  133.     //protected $languages2;
  134.     
  135.     /**
  136.      * Many Eshops have Many Currencies.
  137.      * @ORM\ManyToMany(targetEntity="Currency",cascade={"persist"})
  138.      * @ORM\JoinTable(name="eshop_currency",
  139.      *      joinColumns={@ORM\JoinColumn(name="eshop_id", referencedColumnName="eshop_id")},
  140.      *      inverseJoinColumns={@ORM\JoinColumn(name="currency_id", referencedColumnName="currency_id", unique=false)}
  141.      *      )
  142.      */
  143.     protected $currencies;
  144.     
  145.     /**
  146.      * @ORM\Column(type="string", length=100, nullable=true)
  147.      */
  148.     protected $productView='LIST';    
  149.     
  150.     /**
  151.      * @ORM\Column(type="integer", nullable=true)
  152.      */
  153.     protected $imageThumbWidth=100;    
  154.     /**
  155.      * @ORM\Column(type="integer", nullable=true)
  156.      */
  157.     protected $imageThumbHeight=100;        
  158.     
  159.     /**
  160.      * @ORM\Column(type="integer", nullable=true)
  161.      */
  162.     protected $wireFrameId 1;    
  163.     
  164.     /**
  165.      * @ORM\Column(type="integer", nullable=true)
  166.      */
  167.     protected $productListWireFrameId 1;    
  168.     /**
  169.      * @ORM\Column(type="integer", nullable=true)
  170.      */
  171.     protected $productDetailWireFrameId 1;    
  172.     
  173.     /**
  174.      * @ORM\Column(type="integer")
  175.      */
  176.     protected $preferredLanguageId=0;
  177.     
  178.     /**
  179.      * @ORM\Column(type="integer")
  180.      */
  181.     protected $preferredCurrencyId=0
  182.     
  183.     /**
  184.      * @ORM\Column(type="integer", nullable=true)
  185.      */
  186.     protected $roundPrice=2;    
  187.     
  188.     /**
  189.      * @ORM\Column(type="integer", nullable=true)
  190.      */
  191.     protected $cutLongDescription=0;   
  192.     /**
  193.      * @ORM\Column(type="boolean", nullable=true)
  194.      */
  195.     protected $displayProductsFromSubfolders;        
  196.     
  197.     /**
  198.      * @ORM\Column(type="integer", nullable=true)
  199.      */
  200.     protected $countPerPage=12;   
  201.     /**
  202.      * @ORM\Column(type="boolean", nullable=true)
  203.      */
  204.     protected $isProductCatalogue=false;     
  205.     /**
  206.      * @ORM\Column(type="boolean", nullable=true)
  207.      */
  208.     protected $isPriceDisplay=true
  209.     /**
  210.      * @ORM\Column(type="boolean", nullable=true)
  211.      */
  212.     protected $displayNettoPrices=true;    
  213.     /**
  214.      * @ORM\Column(type="integer", nullable=true)
  215.      */
  216.     protected $preferredVAT;         
  217.     /**
  218.      * @ORM\Column(type="integer", nullable=true)
  219.      */
  220.     protected $categoryImageThumbWidth=100;     
  221.     /**
  222.      * @ORM\Column(type="boolean", nullable=true)
  223.      */
  224.     protected $isStock=false;     
  225.     
  226.     /**
  227.      * @ORM\Column(type="integer", nullable=true)
  228.      */
  229.     protected $displayProductsFromSubfoldersLevel=1;       
  230.     /**
  231.      * @ORM\Column(type="boolean", nullable=true)
  232.      */
  233.     protected $isAsynchrounousShopping=false;
  234.     /**
  235.      * @ORM\Column(type="boolean", nullable=true)
  236.      */
  237.     protected $isVirtualReality=false;
  238.     public function __construct()
  239.     {
  240.         $this->languages = new ArrayCollection();
  241.         $this->currencies = new ArrayCollection();
  242.     }
  243.     public function getEshopId(): ?int
  244.     {
  245.         return $this->eshopId;
  246.     }
  247.     public function getEshopName(): ?string
  248.     {
  249.         return $this->eshopName;
  250.     }
  251.     public function setEshopName(string $eshopName): self
  252.     {
  253.         $this->eshopName $eshopName;
  254.         return $this;
  255.     }
  256.     public function getUserId(): ?int
  257.     {
  258.         return $this->userId;
  259.     }
  260.     public function setUserId(int $userId): self
  261.     {
  262.         $this->userId $userId;
  263.         return $this;
  264.     }
  265.     public function getEshopType(): ?string
  266.     {
  267.         return $this->eshopType;
  268.     }
  269.     public function setEshopType(?string $eshopType): self
  270.     {
  271.         $this->eshopType $eshopType;
  272.         return $this;
  273.     }
  274.     public function getPriority(): ?int
  275.     {
  276.         return $this->priority;
  277.     }
  278.     public function setPriority(?int $priority): self
  279.     {
  280.         $this->priority $priority;
  281.         return $this;
  282.     }
  283.     public function getStatus(): ?string
  284.     {
  285.         return $this->status;
  286.     }
  287.     public function setStatus(?string $status): self
  288.     {
  289.         $this->status $status;
  290.         return $this;
  291.     }
  292.     public function getDateInserted(): ?\DateTimeInterface
  293.     {
  294.         return $this->dateInserted;
  295.     }
  296.     public function setDateInserted(?\DateTimeInterface $dateInserted): self
  297.     {
  298.         $this->dateInserted $dateInserted;
  299.         return $this;
  300.     }
  301.     public function getDateLastControl(): ?\DateTimeInterface
  302.     {
  303.         return $this->dateLastControl;
  304.     }
  305.     public function setDateLastControl(?\DateTimeInterface $dateLastControl): self
  306.     {
  307.         $this->dateLastControl $dateLastControl;
  308.         return $this;
  309.     }
  310.     public function getLogoUrl(): ?string
  311.     {
  312.         return $this->logoUrl;
  313.     }
  314.     public function setLogoUrl(?string $logoUrl): self
  315.     {
  316.         $this->logoUrl $logoUrl;
  317.         return $this;
  318.     }
  319.     public function getNotes(): ?string
  320.     {
  321.         return $this->notes;
  322.     }
  323.     public function setNotes(?string $notes): self
  324.     {
  325.         $this->notes $notes;
  326.         return $this;
  327.     }
  328.     public function getAdminUserId(): ?int
  329.     {
  330.         return $this->adminUserId;
  331.     }
  332.     public function setAdminUserId(?int $adminUserId): self
  333.     {
  334.         $this->adminUserId $adminUserId;
  335.         return $this;
  336.     }
  337.     public function getEshopEmail(): ?string
  338.     {
  339.         return $this->eshopEmail;
  340.     }
  341.     public function setEshopEmail(?string $eshopEmail): self
  342.     {
  343.         $this->eshopEmail $eshopEmail;
  344.         return $this;
  345.     }
  346.     public function getOrderEmail(): ?string
  347.     {
  348.         return $this->orderEmail;
  349.     }
  350.     public function setOrderEmail(?string $orderEmail): self
  351.     {
  352.         $this->orderEmail $orderEmail;
  353.         return $this;
  354.     }
  355.     public function getEshopPrice(): ?int
  356.     {
  357.         return $this->eshopPrice;
  358.     }
  359.     public function setEshopPrice(?int $eshopPrice): self
  360.     {
  361.         $this->eshopPrice $eshopPrice;
  362.         return $this;
  363.     }
  364.     public function isEshopCurrent(): ?bool
  365.     {
  366.         return $this->eshopCurrent;
  367.     }
  368.     public function setEshopCurrent(?bool $eshopCurrent): self
  369.     {
  370.         $this->eshopCurrent $eshopCurrent;
  371.         return $this;
  372.     }
  373.     public function getEshopCss(): ?string
  374.     {
  375.         return $this->eshopCss;
  376.     }
  377.     public function setEshopCss(?string $eshopCss): self
  378.     {
  379.         $this->eshopCss $eshopCss;
  380.         return $this;
  381.     }
  382.     public function getProductView(): ?string
  383.     {
  384.         return $this->productView;
  385.     }
  386.     public function setProductView(?string $productView): self
  387.     {
  388.         $this->productView $productView;
  389.         return $this;
  390.     }
  391.     public function getImageThumbWidth(): ?int
  392.     {
  393.         return $this->imageThumbWidth;
  394.     }
  395.     public function setImageThumbWidth(?int $imageThumbWidth): self
  396.     {
  397.         $this->imageThumbWidth $imageThumbWidth;
  398.         return $this;
  399.     }
  400.     public function getImageThumbHeight(): ?int
  401.     {
  402.         return $this->imageThumbHeight;
  403.     }
  404.     public function setImageThumbHeight(?int $imageThumbHeight): self
  405.     {
  406.         $this->imageThumbHeight $imageThumbHeight;
  407.         return $this;
  408.     }
  409.     public function getWireFrameId(): ?int
  410.     {
  411.         return $this->wireFrameId;
  412.     }
  413.     public function setWireFrameId(?int $wireFrameId): self
  414.     {
  415.         $this->wireFrameId $wireFrameId;
  416.         return $this;
  417.     }
  418.     public function getProductListWireFrameId(): ?int
  419.     {
  420.         return $this->productListWireFrameId;
  421.     }
  422.     public function setProductListWireFrameId(?int $productListWireFrameId): self
  423.     {
  424.         $this->productListWireFrameId $productListWireFrameId;
  425.         return $this;
  426.     }
  427.     public function getProductDetailWireFrameId(): ?int
  428.     {
  429.         return $this->productDetailWireFrameId;
  430.     }
  431.     public function setProductDetailWireFrameId(?int $productDetailWireFrameId): self
  432.     {
  433.         $this->productDetailWireFrameId $productDetailWireFrameId;
  434.         return $this;
  435.     }
  436.     public function getPreferredLanguageId(): ?int
  437.     {
  438.         return $this->preferredLanguageId;
  439.     }
  440.     public function setPreferredLanguageId(int $preferredLanguageId): self
  441.     {
  442.         $this->preferredLanguageId $preferredLanguageId;
  443.         return $this;
  444.     }
  445.     public function getPreferredCurrencyId(): ?int
  446.     {
  447.         return $this->preferredCurrencyId;
  448.     }
  449.     public function setPreferredCurrencyId(int $preferredCurrencyId): self
  450.     {
  451.         $this->preferredCurrencyId $preferredCurrencyId;
  452.         return $this;
  453.     }
  454.     public function getRoundPrice(): ?int
  455.     {
  456.         return $this->roundPrice;
  457.     }
  458.     public function setRoundPrice(?int $roundPrice): self
  459.     {
  460.         $this->roundPrice $roundPrice;
  461.         return $this;
  462.     }
  463.     public function getCutLongDescription(): ?int
  464.     {
  465.         return $this->cutLongDescription;
  466.     }
  467.     public function setCutLongDescription(?int $cutLongDescription): self
  468.     {
  469.         $this->cutLongDescription $cutLongDescription;
  470.         return $this;
  471.     }
  472.     public function isDisplayProductsFromSubfolders(): ?bool
  473.     {
  474.         return $this->displayProductsFromSubfolders;
  475.     }
  476.     public function setDisplayProductsFromSubfolders(?bool $displayProductsFromSubfolders): self
  477.     {
  478.         $this->displayProductsFromSubfolders $displayProductsFromSubfolders;
  479.         return $this;
  480.     }
  481.     public function getCountPerPage(): ?int
  482.     {
  483.         return $this->countPerPage;
  484.     }
  485.     public function setCountPerPage(?int $countPerPage): self
  486.     {
  487.         $this->countPerPage $countPerPage;
  488.         return $this;
  489.     }
  490.     public function isIsProductCatalogue(): ?bool
  491.     {
  492.         return $this->isProductCatalogue;
  493.     }
  494.     public function setIsProductCatalogue(?bool $isProductCatalogue): self
  495.     {
  496.         $this->isProductCatalogue $isProductCatalogue;
  497.         return $this;
  498.     }
  499.     public function isIsPriceDisplay(): ?bool
  500.     {
  501.         return $this->isPriceDisplay;
  502.     }
  503.     public function setIsPriceDisplay(?bool $isPriceDisplay): self
  504.     {
  505.         $this->isPriceDisplay $isPriceDisplay;
  506.         return $this;
  507.     }
  508.     public function isDisplayNettoPrices(): ?bool
  509.     {
  510.         return $this->displayNettoPrices;
  511.     }
  512.     public function setDisplayNettoPrices(?bool $displayNettoPrices): self
  513.     {
  514.         $this->displayNettoPrices $displayNettoPrices;
  515.         return $this;
  516.     }
  517.     public function getPreferredVAT(): ?int
  518.     {
  519.         return $this->preferredVAT;
  520.     }
  521.     public function setPreferredVAT(?int $preferredVAT): self
  522.     {
  523.         $this->preferredVAT $preferredVAT;
  524.         return $this;
  525.     }
  526.     public function getCategoryImageThumbWidth(): ?int
  527.     {
  528.         return $this->categoryImageThumbWidth;
  529.     }
  530.     public function setCategoryImageThumbWidth(?int $categoryImageThumbWidth): self
  531.     {
  532.         $this->categoryImageThumbWidth $categoryImageThumbWidth;
  533.         return $this;
  534.     }
  535.     public function isIsStock(): ?bool
  536.     {
  537.         return $this->isStock;
  538.     }
  539.     public function setIsStock(?bool $isStock): self
  540.     {
  541.         $this->isStock $isStock;
  542.         return $this;
  543.     }
  544.     public function getDisplayProductsFromSubfoldersLevel(): ?int
  545.     {
  546.         return $this->displayProductsFromSubfoldersLevel;
  547.     }
  548.     public function setDisplayProductsFromSubfoldersLevel(?int $displayProductsFromSubfoldersLevel): self
  549.     {
  550.         $this->displayProductsFromSubfoldersLevel $displayProductsFromSubfoldersLevel;
  551.         return $this;
  552.     }
  553.     public function isIsAsynchrounousShopping(): ?bool
  554.     {
  555.         return $this->isAsynchrounousShopping;
  556.     }
  557.     public function setIsAsynchrounousShopping(?bool $isAsynchrounousShopping): self
  558.     {
  559.         $this->isAsynchrounousShopping $isAsynchrounousShopping;
  560.         return $this;
  561.     }
  562.     /**
  563.      * @return Collection<int, Language>
  564.      */
  565.     public function getLanguages(): Collection
  566.     {
  567.         return $this->languages;
  568.     }
  569.     public function addLanguage(Language $language): self
  570.     {
  571.         if (!$this->languages->contains($language)) {
  572.             $this->languages->add($language);
  573.             //$language->setEshop($this);
  574.         }
  575.         return $this;
  576.     }
  577.     public function removeLanguage(Language $language): self
  578.     {
  579.         if ($this->languages->removeElement($language)) {
  580.             // set the owning side to null (unless already changed)
  581.             $this->languages->removeElement($language);
  582. //            if ($language->getEshop() === $this) {
  583. //                $language->setEshop(null);
  584. //            }
  585.         }
  586.         return $this;
  587.     }
  588.     /**
  589.      * @return Collection<int, Currency>
  590.      */
  591.     public function getCurrencies(): Collection
  592.     {
  593.         return $this->currencies;
  594.     }
  595.     public function addCurrency(Currency $currency): self
  596.     {
  597.         if (!$this->currencies->contains($currency)) {
  598.             $this->currencies->add($currency);
  599.         }
  600.         return $this;
  601.     }
  602.     public function removeCurrency(Currency $currency): self
  603.     {
  604.         $this->currencies->removeElement($currency);
  605.         return $this;
  606.     }
  607.     public function isIsVirtualReality(): ?bool
  608.     {
  609.         return $this->isVirtualReality;
  610.     }
  611.     public function setIsVirtualReality(?bool $isVirtualReality): static
  612.     {
  613.         $this->isVirtualReality $isVirtualReality;
  614.         return $this;
  615.     }
  616. }