src/CasinoBundle/Entity/Licence.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\CasinoBundle\Entity;
  3. use App\CmsBundle\Entity\AcronymTrait;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * Licence
  9.  *
  10.  * @ORM\Table(name="licence",
  11.  *     uniqueConstraints={
  12.  *          @ORM\UniqueConstraint(name="licence_name_uindex", columns={"name"})
  13.  *     }
  14.  * )
  15.  * @ORM\Entity(repositoryClass="App\CasinoBundle\Repository\LicenceRepository")
  16.  */
  17. class Licence
  18. {
  19.     use AliasTrait;
  20.     use AcronymTrait;
  21.     /**
  22.      * @var int
  23.      *
  24.      * @ORM\Column(name="id", type="integer", nullable=false)
  25.      * @ORM\Id
  26.      * @ORM\GeneratedValue(strategy="IDENTITY")
  27.      */
  28.     private $id;
  29.     /**
  30.      * @var string
  31.      *
  32.      * @ORM\Column(name="name", type="string", length=255, nullable=false)
  33.      */
  34.     private $name;
  35.     /**
  36.      * @var int
  37.      *
  38.      * @ORM\Column(name="security_level", type="integer", nullable=true)
  39.      */
  40.     private $securityLevel;
  41.     /**
  42.      * @var int
  43.      *
  44.      * @ORM\Column(name="complaint_type", type="integer", nullable=true)
  45.      */
  46.     private $complaintType;
  47.     /**
  48.      * @var string
  49.      *
  50.      * @ORM\Column(name="complaint_url", type="string", length=255, nullable=true)
  51.      */
  52.     private $complaintUrl;
  53.     /**
  54.      * @var string
  55.      *
  56.      * @ORM\Column(name="destination", type="string", length=255, nullable=true)
  57.      */
  58.     private $destination;
  59.     /**
  60.      * @var string
  61.      *
  62.      * @ORM\Column(name="address", type="string", length=255, nullable=true)
  63.      */
  64.     private $address;
  65.     /**
  66.      * @var string
  67.      *
  68.      * @ORM\Column(name="address2", type="string", length=255, nullable=true)
  69.      */
  70.     private $address2;
  71.     /**
  72.      * @var string
  73.      *
  74.      * @ORM\Column(name="city", type="string", length=255, nullable=true)
  75.      */
  76.     private $city;
  77.     /**
  78.      * @var string
  79.      *
  80.      * @ORM\Column(name="post_index", type="string", length=255, nullable=true)
  81.      */
  82.     private $postIndex;
  83.     /**
  84.      * @var string
  85.      *
  86.      * @ORM\Column(name="phone1", type="string", length=255, nullable=true)
  87.      */
  88.     private $phone1;
  89.     /**
  90.      * @var string
  91.      *
  92.      * @ORM\Column(name="phone2", type="string", length=255, nullable=true)
  93.      */
  94.     private $phone2;
  95.     /**
  96.      * @var string
  97.      *
  98.      * @ORM\Column(name="fax", type="string", length=255, nullable=true)
  99.      */
  100.     private $fax;
  101.     /**
  102.      * @var string
  103.      *
  104.      * @ORM\Column(name="email", type="string", length=255, nullable=true)
  105.      */
  106.     private $email;
  107.     /**
  108.      * @var string
  109.      *
  110.      * @ORM\Column(name="website", type="string", length=255, nullable=true)
  111.      */
  112.     private $website;
  113.     /**
  114.      * @var string
  115.      *
  116.      * @ORM\Column(name="note", type="text", nullable=true)
  117.      */
  118.     private $note;
  119.     /**
  120.      * @var string
  121.      *
  122.      * @ORM\Column(name="complaint_email", type="string", length=255, nullable=true)
  123.      */
  124.     private $complaintEmail;
  125.     /**
  126.      * @ORM\OneToMany(targetEntity="App\CasinoBundle\Entity\CasinoLicence", mappedBy="licence", cascade={"persist"}, orphanRemoval=true)
  127.      */
  128.     private $casinoLicences;
  129.     /**
  130.      * @var Country|null
  131.      * @ORM\ManyToOne(targetEntity="App\CasinoBundle\Entity\Country", inversedBy="licences", cascade={"persist"})
  132.      */
  133.     private $country;
  134.     /**
  135.      * @ORM\OneToMany(targetEntity="App\CasinoBundle\Entity\Alias", mappedBy="licence", cascade={"persist"}, orphanRemoval=true)
  136.      */
  137.     private Collection $aliases;
  138.     public function __construct()
  139.     {
  140.         $this->casinoLicences = new ArrayCollection();
  141.         $this->aliases =        new ArrayCollection();
  142.     }
  143.     public function __toString(): string
  144.     {
  145.         return $this->name;
  146.     }
  147.     /**
  148.      * @return int
  149.      */
  150.     public function getId(): int
  151.     {
  152.         return $this->id;
  153.     }
  154.     /**
  155.      * @param int $id
  156.      */
  157.     public function setId(int $id): void
  158.     {
  159.         $this->id $id;
  160.     }
  161.     /**
  162.      * @return string
  163.      */
  164.     public function getName(): string
  165.     {
  166.         return $this->name;
  167.     }
  168.     /**
  169.      * @param string $name
  170.      */
  171.     public function setName(string $name): void
  172.     {
  173.         $this->name $name;
  174.     }
  175.     /**
  176.      * @return int
  177.      */
  178.     public function getSecurityLevel(): ?int
  179.     {
  180.         return $this->securityLevel;
  181.     }
  182.     /**
  183.      * @param int $securityLevel
  184.      */
  185.     public function setSecurityLevel(int $securityLevel): self
  186.     {
  187.         $this->securityLevel $securityLevel;
  188.         return $this;
  189.     }
  190.     /**
  191.      * @return int
  192.      */
  193.     public function getComplaintType(): ?int
  194.     {
  195.         return $this->complaintType;
  196.     }
  197.     /**
  198.      * @param int $complaintType
  199.      */
  200.     public function setComplaintType(int $complaintType): self
  201.     {
  202.         $this->complaintType $complaintType;
  203.         return $this;
  204.     }
  205.     /**
  206.      * @return Collection|CasinoLicence[]
  207.      */
  208.     public function getCasinoLicences(): Collection
  209.     {
  210.         return $this->casinoLicences;
  211.     }
  212.     public function addCasinoLicence(CasinoLicence $casinoLicence): self
  213.     {
  214.         if (!$this->casinoLicences->contains($casinoLicence)) {
  215.             $this->casinoLicences[] = $casinoLicence;
  216.             $casinoLicence->setLicence($this);
  217.         }
  218.         return $this;
  219.     }
  220.     public function removeCasinoLicence(CasinoLicence $casinoLicence): self
  221.     {
  222.         if ($this->casinoLicences->contains($casinoLicence)) {
  223.             $this->casinoLicences->removeElement($casinoLicence);
  224.             $casinoLicence->setLicence(null);
  225.         }
  226.         return $this;
  227.     }
  228.     public function setCountry(?Country $country null): self
  229.     {
  230.         if ($country) {
  231.             $country->addLicence($this);
  232.         } else {
  233.             $this->country->removeLicence($this);
  234.         }
  235.         $this->country $country;
  236.         return $this;
  237.     }
  238.     public function getCountry(): ?Country
  239.     {
  240.         return $this->country;
  241.     }
  242.     public function getComplaintUrl(): ?string
  243.     {
  244.         return $this->complaintUrl;
  245.     }
  246.     public function setComplaintUrl(?string $complaintUrl): self
  247.     {
  248.         $this->complaintUrl $complaintUrl;
  249.         return $this;
  250.     }
  251.     public function getComplaintEmail(): ?string
  252.     {
  253.         return $this->complaintEmail;
  254.     }
  255.     public function setComplaintEmail(?string $complaintEmail): self
  256.     {
  257.         $this->complaintEmail $complaintEmail;
  258.         return $this;
  259.     }
  260.     public function setDestination(?string $destination): self
  261.     {
  262.         $this->destination $destination;
  263.         return $this;
  264.     }
  265.     public function getDestination(): ?string
  266.     {
  267.         return $this->destination;
  268.     }
  269.     public function setAddress(?string $address): self
  270.     {
  271.         $this->address $address;
  272.         return $this;
  273.     }
  274.     public function getAddress(): ?string
  275.     {
  276.         return $this->address;
  277.     }
  278.     public function setAddress2(?string $address2): self
  279.     {
  280.         $this->address2 $address2;
  281.         return $this;
  282.     }
  283.     public function getAddress2(): ?string
  284.     {
  285.         return $this->address2;
  286.     }
  287.     public function setCity(?string $city): self
  288.     {
  289.         $this->city $city;
  290.         return $this;
  291.     }
  292.     public function getCity(): ?string
  293.     {
  294.         return $this->city;
  295.     }
  296.     public function setPostIndex(?string $postIndex): self
  297.     {
  298.         $this->postIndex $postIndex;
  299.         return $this;
  300.     }
  301.     public function getPostIndex(): ?string
  302.     {
  303.         return $this->postIndex;
  304.     }
  305.     public function setPhone1(?string $phone1): self
  306.     {
  307.         $this->phone1 $phone1;
  308.         return $this;
  309.     }
  310.     public function getPhone1(): ?string
  311.     {
  312.         return $this->phone1;
  313.     }
  314.     public function setPhone2(?string $phone2): self
  315.     {
  316.         $this->phone2 $phone2;
  317.         return $this;
  318.     }
  319.     public function getPhone2(): ?string
  320.     {
  321.         return $this->phone2;
  322.     }
  323.     public function setFax(?string $fax): self
  324.     {
  325.         $this->fax $fax;
  326.         return $this;
  327.     }
  328.     public function getFax(): ?string
  329.     {
  330.         return $this->fax;
  331.     }
  332.     public function setEmail(?string $email): self
  333.     {
  334.         $this->email $email;
  335.         return $this;
  336.     }
  337.     public function getEmail(): ?string
  338.     {
  339.         return $this->email;
  340.     }
  341.     public function setWebsite(?string $website): self
  342.     {
  343.         $this->website $website;
  344.         return $this;
  345.     }
  346.     public function getWebsite(): ?string
  347.     {
  348.         return $this->website;
  349.     }
  350.     public function setNote(?string $note): self
  351.     {
  352.         $this->note $note;
  353.         return $this;
  354.     }
  355.     public function getNote(): ?string
  356.     {
  357.         return $this->note;
  358.     }
  359. }