<?php
/**
* Service class represents simple model of Website entity
*
* $Project: Alliancemarkets2 $
* $Id$
*
* @package alliancemarkets2
* @author George Matyas <webexciter@yahoo.com>
* @version $Revision$
*/
// src/AppBundle/Entity/Website.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;
/**
* @ORM\Entity(repositoryClass="App\EntityRepo\WebsiteRepo")
* @ORM\Table(name="website")
*/
class Website
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $websiteId=0;
/**
* @ORM\Column(type="string", length=100)
*/
protected $websiteName;
/**
* @ORM\Column(type="date", nullable=true)
*/
protected $dateCreated;
/**
* @ORM\Column(type="date", nullable=true)
*/
protected $dateLastLogin;
/**
* @ORM\Column(type="string", length=50, nullable=true)
*/
protected $version;
/**
* @ORM\Column(type="string", length=50, nullable=true)
*/
protected $designCss;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $layoutId=1;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $statusId=1;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $notes;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
protected $websiteUrl;
/**
* @ORM\Column(type="date", nullable=true)
*/
protected $datePayment;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $homepageId=1;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $userId;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
protected $websiteCurrent;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
protected $websiteCss;
/*
* One website has One wireframe.
* @ORM\OneToOne(targetEntity="WireFrame")
* @ORM\JoinColumn(name="wire_frame_id", referencedColumnName="wire_frame_id")
*/
//protected $wireFrame;
/**
* @ORM\Column(type="integer", nullable=true)
*/
protected $wireFrameId = 1;
/**
* Many Eshops have Many Languages.
* @ORM\ManyToMany(targetEntity="Language",cascade={"persist"})
* @ORM\JoinTable(name="website_language",
* joinColumns={@ORM\JoinColumn(name="website_id", referencedColumnName="website_id")},
* inverseJoinColumns={@ORM\JoinColumn(name="lang_id", referencedColumnName="lang_id", unique=false)}
* )
*/
protected $languages;
/**
* @ORM\Column(type="integer")
*/
protected $preferredLanguageId=0;
public function __construct()
{
$this->languages = new ArrayCollection();
}
public function getWebsiteId(): ?int
{
return $this->websiteId;
}
public function getWebsiteName(): ?string
{
return $this->websiteName;
}
public function setWebsiteName(string $websiteName): self
{
$this->websiteName = $websiteName;
return $this;
}
public function getDateCreated(): ?\DateTimeInterface
{
return $this->dateCreated;
}
public function setDateCreated(?\DateTimeInterface $dateCreated): self
{
$this->dateCreated = $dateCreated;
return $this;
}
public function getDateLastLogin(): ?\DateTimeInterface
{
return $this->dateLastLogin;
}
public function setDateLastLogin(?\DateTimeInterface $dateLastLogin): self
{
$this->dateLastLogin = $dateLastLogin;
return $this;
}
public function getVersion(): ?string
{
return $this->version;
}
public function setVersion(?string $version): self
{
$this->version = $version;
return $this;
}
public function getDesignCss(): ?string
{
return $this->designCss;
}
public function setDesignCss(?string $designCss): self
{
$this->designCss = $designCss;
return $this;
}
public function getLayoutId(): ?int
{
return $this->layoutId;
}
public function setLayoutId(?int $layoutId): self
{
$this->layoutId = $layoutId;
return $this;
}
public function getStatusId(): ?int
{
return $this->statusId;
}
public function setStatusId(?int $statusId): self
{
$this->statusId = $statusId;
return $this;
}
public function getNotes(): ?string
{
return $this->notes;
}
public function setNotes(?string $notes): self
{
$this->notes = $notes;
return $this;
}
public function getWebsiteUrl(): ?string
{
return $this->websiteUrl;
}
public function setWebsiteUrl(?string $websiteUrl): self
{
$this->websiteUrl = $websiteUrl;
return $this;
}
public function getDatePayment(): ?\DateTimeInterface
{
return $this->datePayment;
}
public function setDatePayment(?\DateTimeInterface $datePayment): self
{
$this->datePayment = $datePayment;
return $this;
}
public function getHomepageId(): ?int
{
return $this->homepageId;
}
public function setHomepageId(?int $homepageId): self
{
$this->homepageId = $homepageId;
return $this;
}
public function getUserId(): ?int
{
return $this->userId;
}
public function setUserId(?int $userId): self
{
$this->userId = $userId;
return $this;
}
public function isWebsiteCurrent(): ?bool
{
return $this->websiteCurrent;
}
public function setWebsiteCurrent(?bool $websiteCurrent): self
{
$this->websiteCurrent = $websiteCurrent;
return $this;
}
public function getWebsiteCss(): ?string
{
return $this->websiteCss;
}
public function setWebsiteCss(?string $websiteCss): self
{
$this->websiteCss = $websiteCss;
return $this;
}
public function getWireFrameId(): ?int
{
return $this->wireFrameId;
}
public function setWireFrameId(?int $wireFrameId): self
{
$this->wireFrameId = $wireFrameId;
return $this;
}
public function getPreferredLanguageId(): ?int
{
return $this->preferredLanguageId;
}
public function setPreferredLanguageId(int $preferredLanguageId): self
{
$this->preferredLanguageId = $preferredLanguageId;
return $this;
}
/**
* @return Collection<int, Language>
*/
public function getLanguages(): Collection
{
return $this->languages;
}
public function addLanguage(Language $language): self
{
if (!$this->languages->contains($language)) {
$this->languages->add($language);
}
return $this;
}
public function removeLanguage(Language $language): self
{
$this->languages->removeElement($language);
return $this;
}
}