<?php
namespace App\CasinoBundle\Entity;
use App\CmsBundle\Entity\AcronymTrait;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* Licence
*
* @ORM\Table(name="licence",
* uniqueConstraints={
* @ORM\UniqueConstraint(name="licence_name_uindex", columns={"name"})
* }
* )
* @ORM\Entity(repositoryClass="App\CasinoBundle\Repository\LicenceRepository")
*/
class Licence
{
use AliasTrait;
use AcronymTrait;
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="name", type="string", length=255, nullable=false)
*/
private $name;
/**
* @var int
*
* @ORM\Column(name="security_level", type="integer", nullable=true)
*/
private $securityLevel;
/**
* @var int
*
* @ORM\Column(name="complaint_type", type="integer", nullable=true)
*/
private $complaintType;
/**
* @var string
*
* @ORM\Column(name="complaint_url", type="string", length=255, nullable=true)
*/
private $complaintUrl;
/**
* @var string
*
* @ORM\Column(name="destination", type="string", length=255, nullable=true)
*/
private $destination;
/**
* @var string
*
* @ORM\Column(name="address", type="string", length=255, nullable=true)
*/
private $address;
/**
* @var string
*
* @ORM\Column(name="address2", type="string", length=255, nullable=true)
*/
private $address2;
/**
* @var string
*
* @ORM\Column(name="city", type="string", length=255, nullable=true)
*/
private $city;
/**
* @var string
*
* @ORM\Column(name="post_index", type="string", length=255, nullable=true)
*/
private $postIndex;
/**
* @var string
*
* @ORM\Column(name="phone1", type="string", length=255, nullable=true)
*/
private $phone1;
/**
* @var string
*
* @ORM\Column(name="phone2", type="string", length=255, nullable=true)
*/
private $phone2;
/**
* @var string
*
* @ORM\Column(name="fax", type="string", length=255, nullable=true)
*/
private $fax;
/**
* @var string
*
* @ORM\Column(name="email", type="string", length=255, nullable=true)
*/
private $email;
/**
* @var string
*
* @ORM\Column(name="website", type="string", length=255, nullable=true)
*/
private $website;
/**
* @var string
*
* @ORM\Column(name="note", type="text", nullable=true)
*/
private $note;
/**
* @var string
*
* @ORM\Column(name="complaint_email", type="string", length=255, nullable=true)
*/
private $complaintEmail;
/**
* @ORM\OneToMany(targetEntity="App\CasinoBundle\Entity\CasinoLicence", mappedBy="licence", cascade={"persist"}, orphanRemoval=true)
*/
private $casinoLicences;
/**
* @var Country|null
* @ORM\ManyToOne(targetEntity="App\CasinoBundle\Entity\Country", inversedBy="licences", cascade={"persist"})
*/
private $country;
/**
* @ORM\OneToMany(targetEntity="App\CasinoBundle\Entity\Alias", mappedBy="licence", cascade={"persist"}, orphanRemoval=true)
*/
private Collection $aliases;
public function __construct()
{
$this->casinoLicences = new ArrayCollection();
$this->aliases = new ArrayCollection();
}
public function __toString(): string
{
return $this->name;
}
/**
* @return int
*/
public function getId(): int
{
return $this->id;
}
/**
* @param int $id
*/
public function setId(int $id): void
{
$this->id = $id;
}
/**
* @return string
*/
public function getName(): string
{
return $this->name;
}
/**
* @param string $name
*/
public function setName(string $name): void
{
$this->name = $name;
}
/**
* @return int
*/
public function getSecurityLevel(): ?int
{
return $this->securityLevel;
}
/**
* @param int $securityLevel
*/
public function setSecurityLevel(int $securityLevel): self
{
$this->securityLevel = $securityLevel;
return $this;
}
/**
* @return int
*/
public function getComplaintType(): ?int
{
return $this->complaintType;
}
/**
* @param int $complaintType
*/
public function setComplaintType(int $complaintType): self
{
$this->complaintType = $complaintType;
return $this;
}
/**
* @return Collection|CasinoLicence[]
*/
public function getCasinoLicences(): Collection
{
return $this->casinoLicences;
}
public function addCasinoLicence(CasinoLicence $casinoLicence): self
{
if (!$this->casinoLicences->contains($casinoLicence)) {
$this->casinoLicences[] = $casinoLicence;
$casinoLicence->setLicence($this);
}
return $this;
}
public function removeCasinoLicence(CasinoLicence $casinoLicence): self
{
if ($this->casinoLicences->contains($casinoLicence)) {
$this->casinoLicences->removeElement($casinoLicence);
$casinoLicence->setLicence(null);
}
return $this;
}
public function setCountry(?Country $country = null): self
{
if ($country) {
$country->addLicence($this);
} else {
$this->country->removeLicence($this);
}
$this->country = $country;
return $this;
}
public function getCountry(): ?Country
{
return $this->country;
}
public function getComplaintUrl(): ?string
{
return $this->complaintUrl;
}
public function setComplaintUrl(?string $complaintUrl): self
{
$this->complaintUrl = $complaintUrl;
return $this;
}
public function getComplaintEmail(): ?string
{
return $this->complaintEmail;
}
public function setComplaintEmail(?string $complaintEmail): self
{
$this->complaintEmail = $complaintEmail;
return $this;
}
public function setDestination(?string $destination): self
{
$this->destination = $destination;
return $this;
}
public function getDestination(): ?string
{
return $this->destination;
}
public function setAddress(?string $address): self
{
$this->address = $address;
return $this;
}
public function getAddress(): ?string
{
return $this->address;
}
public function setAddress2(?string $address2): self
{
$this->address2 = $address2;
return $this;
}
public function getAddress2(): ?string
{
return $this->address2;
}
public function setCity(?string $city): self
{
$this->city = $city;
return $this;
}
public function getCity(): ?string
{
return $this->city;
}
public function setPostIndex(?string $postIndex): self
{
$this->postIndex = $postIndex;
return $this;
}
public function getPostIndex(): ?string
{
return $this->postIndex;
}
public function setPhone1(?string $phone1): self
{
$this->phone1 = $phone1;
return $this;
}
public function getPhone1(): ?string
{
return $this->phone1;
}
public function setPhone2(?string $phone2): self
{
$this->phone2 = $phone2;
return $this;
}
public function getPhone2(): ?string
{
return $this->phone2;
}
public function setFax(?string $fax): self
{
$this->fax = $fax;
return $this;
}
public function getFax(): ?string
{
return $this->fax;
}
public function setEmail(?string $email): self
{
$this->email = $email;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setWebsite(?string $website): self
{
$this->website = $website;
return $this;
}
public function getWebsite(): ?string
{
return $this->website;
}
public function setNote(?string $note): self
{
$this->note = $note;
return $this;
}
public function getNote(): ?string
{
return $this->note;
}
}