<?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\EshopLinkRepo")
* @ORM\Table(name="eshop_link")
* @Gedmo\TranslationEntity(class="App\Entity\EshopLinkTranslation")
*/
class EshopLink implements Translatable
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $eshopLinkId=0;
/**
* @ORM\Column(type="string", length=100)
* @Gedmo\Translatable
*/
protected $eshopLinkName;
/**
* @ORM\Column(type="text", nullable=true)
* @Gedmo\Translatable
*/
protected $eshopLinkDescription;
/**
* @ORM\Column(type="string", length=255)
* @Gedmo\Translatable
*/
protected $eshopLinkUrl;
/**
* @ORM\Column(type="integer")
*/
protected $userId=0;
/**
* @ORM\Column(type="string", length=100, nullable=true)
*/
protected $eshopLinkType='eshop';
/**
* @ORM\Column(type="integer", nullable=true)
*/
protected $priority=1;
/**
* @ORM\Column(type="string", length=100, nullable=true)
*/
protected $status='new';
/**
* @ORM\Column(type="date", nullable=true, nullable=true)
*/
protected $dateInserted;
/**
* @ORM\Column(type="date", nullable=true, nullable=true)
*/
protected $dateLastControl;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
protected $logoUrl;
/**
* @ORM\Column(type="text", nullable=true)
*/
protected $notes;
/**
* @ORM\Column(type="integer", nullable=true)
*/
protected $adminUserId=0;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
protected $eshopLinkEmail;
/**
* Many Eshops have Many Languages.
* @ORM\ManyToMany(targetEntity="Language",cascade={"persist"})
* @ORM\JoinTable(name="eshop_link_language",
* joinColumns={@ORM\JoinColumn(name="eshop_link_id", referencedColumnName="eshop_link_id")},
* inverseJoinColumns={@ORM\JoinColumn(name="lang_id", referencedColumnName="lang_id", unique=false)}
* )
*/
protected $languages;
/**
* @ORM\Column(type="integer")
*/
protected $preferredLanguageId=0;
/**
* @ORM\Column(type="integer", nullable=true)
*/
protected $cutLongDescription=0;
/**
* Post locale
* Used locale to override Translation listener's locale
*
* @Gedmo\Locale
*
*/
protected $locale;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
protected $eshopLinkCurrent;
/**
* One EshopLink has Many Departments.
* @ORM\ManyToMany(targetEntity="Department",cascade={"persist"})
* @ORM\JoinTable(name="eshop_link_department",
* joinColumns={@ORM\JoinColumn(name="eshop_link_id", referencedColumnName="eshop_link_id")},
* inverseJoinColumns={@ORM\JoinColumn(name="department_id", referencedColumnName="department_id", unique=false)}
* )
*/
protected $departments;
/**
* @ORM\Column(type="integer")
*/
protected $viewedCount=0;
/**
* @ORM\Column(type="integer")
*/
protected $clickedCount=0;
/**
* Constructor
*/
public function __construct()
{
$this->languages = new \Doctrine\Common\Collections\ArrayCollection();
$this->departments = new \Doctrine\Common\Collections\ArrayCollection();
}
public function getEshopLinkId(): ?int
{
return $this->eshopLinkId;
}
public function getEshopLinkName(): ?string
{
return $this->eshopLinkName;
}
public function setEshopLinkName(string $eshopLinkName): static
{
$this->eshopLinkName = $eshopLinkName;
return $this;
}
public function getEshopLinkDescription(): ?string
{
return $this->eshopLinkDescription;
}
public function setEshopLinkDescription(?string $eshopLinkDescription): static
{
$this->eshopLinkDescription = $eshopLinkDescription;
return $this;
}
public function getEshopLinkUrl(): ?string
{
return $this->eshopLinkUrl;
}
public function setEshopLinkUrl(string $eshopLinkUrl): static
{
$this->eshopLinkUrl = $eshopLinkUrl;
return $this;
}
public function getUserId(): ?int
{
return $this->userId;
}
public function setUserId(int $userId): static
{
$this->userId = $userId;
return $this;
}
public function getEshopLinkType(): ?string
{
return $this->eshopLinkType;
}
public function setEshopLinkType(?string $eshopLinkType): static
{
$this->eshopLinkType = $eshopLinkType;
return $this;
}
public function getPriority(): ?int
{
return $this->priority;
}
public function setPriority(?int $priority): static
{
$this->priority = $priority;
return $this;
}
public function getStatus(): ?string
{
return $this->status;
}
public function setStatus(?string $status): static
{
$this->status = $status;
return $this;
}
public function getDateInserted(): ?\DateTimeInterface
{
return $this->dateInserted;
}
public function setDateInserted(?\DateTimeInterface $dateInserted): static
{
$this->dateInserted = $dateInserted;
return $this;
}
public function getDateLastControl(): ?\DateTimeInterface
{
return $this->dateLastControl;
}
public function setDateLastControl(?\DateTimeInterface $dateLastControl): static
{
$this->dateLastControl = $dateLastControl;
return $this;
}
public function getLogoUrl(): ?string
{
return $this->logoUrl;
}
public function setLogoUrl(?string $logoUrl): static
{
$this->logoUrl = $logoUrl;
return $this;
}
public function getNotes(): ?string
{
return $this->notes;
}
public function setNotes(?string $notes): static
{
$this->notes = $notes;
return $this;
}
public function getAdminUserId(): ?int
{
return $this->adminUserId;
}
public function setAdminUserId(?int $adminUserId): static
{
$this->adminUserId = $adminUserId;
return $this;
}
public function getEshopLinkEmail(): ?string
{
return $this->eshopLinkEmail;
}
public function setEshopLinkEmail(?string $eshopLinkEmail): static
{
$this->eshopLinkEmail = $eshopLinkEmail;
return $this;
}
public function getPreferredLanguageId(): ?int
{
return $this->preferredLanguageId;
}
public function setPreferredLanguageId(int $preferredLanguageId): static
{
$this->preferredLanguageId = $preferredLanguageId;
return $this;
}
public function getCutLongDescription(): ?int
{
return $this->cutLongDescription;
}
public function setCutLongDescription(?int $cutLongDescription): static
{
$this->cutLongDescription = $cutLongDescription;
return $this;
}
public function isEshopLinkCurrent(): ?bool
{
return $this->eshopLinkCurrent;
}
public function setEshopLinkCurrent(?bool $eshopLinkCurrent): static
{
$this->eshopLinkCurrent = $eshopLinkCurrent;
return $this;
}
/**
* @return Collection<int, Language>
*/
public function getLanguages(): Collection
{
return $this->languages;
}
public function addLanguage(Language $language): static
{
if (!$this->languages->contains($language)) {
$this->languages->add($language);
}
return $this;
}
public function removeLanguage(Language $language): static
{
$this->languages->removeElement($language);
return $this;
}
/**
* @return Collection<int, Department>
*/
public function getDepartments(): Collection
{
return $this->departments;
}
public function addDepartment(Department $department): static
{
if (!$this->departments->contains($department)) {
$this->departments->add($department);
}
return $this;
}
public function removeDepartment(Department $department): static
{
$this->departments->removeElement($department);
return $this;
}
/**
* Set locale
*
* @param string $locale
*
* @return WebPage
*/
public function setLocale($locale)
{
$this->locale = $locale;
return $this;
}
/**
* Get locale
*
* @return string
*/
public function getLocale()
{
return $this->locale;
}
public function getViewedCount(): ?int
{
return $this->viewedCount;
}
public function setViewedCount(int $viewedCount): static
{
$this->viewedCount = $viewedCount;
return $this;
}
public function getClickedCount(): ?int
{
return $this->clickedCount;
}
public function setClickedCount(int $clickedCount): static
{
$this->clickedCount = $clickedCount;
return $this;
}
}