src/Entity/Cinema.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CinemaRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=CinemaRepository::class)
  9.  */
  10. class Cinema
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255, nullable=true)
  20.      */
  21.     private $nom;
  22.     /**
  23.      * @ORM\Column(type="string", length=10, nullable=true)
  24.      */
  25.     private $codepostal;
  26.     /**
  27.      * @ORM\Column(type="string", length=255, nullable=true)
  28.      */
  29.     private $ville;
  30.     /**
  31.      * @ORM\Column(type="string", length=255, nullable=true)
  32.      */
  33.     private $libelle;
  34.     /**
  35.      * @ORM\Column(type="integer", nullable=true)
  36.      */
  37.     private $departement;
  38.     /**
  39.      * @ORM\Column(type="string", length=255, nullable=true)
  40.      */
  41.     private $adresse;
  42.     /**
  43.      * @ORM\Column(type="string", length=255, nullable=true)
  44.      */
  45.     private $mail;
  46.     /**
  47.      * @ORM\Column(type="string", length=50, nullable=true)
  48.      */
  49.     private $groupe;
  50.     /**
  51.      * @ORM\OneToMany(targetEntity=User::class, mappedBy="cinema")
  52.      */
  53.     private $users;
  54.     /**
  55.      * @ORM\Column(type="boolean", nullable=true)
  56.      */
  57.     private $convention;
  58.     /**
  59.      * @ORM\OneToMany(targetEntity=CinemaContact::class, mappedBy="cinema")
  60.      */
  61.     private $cinemaContacts;
  62.     /**
  63.      * @ORM\Column(type="datetime", nullable=true)
  64.      */
  65.     private $conventionDate;
  66.     /**
  67.      * @ORM\Column(type="string", length=50, nullable=true)
  68.      */
  69.     private $secretScanner;
  70.     /**
  71.      * @ORM\Column(type="string", length=15, nullable=true)
  72.      */
  73.     private $passeursImages;
  74.     /**
  75.      * @ORM\OneToMany(targetEntity=Ticket::class, mappedBy="cinema")
  76.      */
  77.     private $tickets;
  78.     /**
  79.      * @ORM\Column(type="float", nullable=true)
  80.      */
  81.     private $conventionTarif;
  82.     /**
  83.      * @ORM\Column(type="string", length=255, nullable=true)
  84.      */
  85.     private $conventionSignataire;
  86.     /**
  87.      * @ORM\OneToMany(targetEntity=FicheLiaison::class, mappedBy="cinema")
  88.      */
  89.     private $ficheLiaisons;
  90.     /**
  91.      * @ORM\Column(type="integer")
  92.      */
  93.     private $nbEntrees;
  94.     public function __construct()
  95.     {
  96.         $this->users = new ArrayCollection();
  97.         $this->cinemaContacts = new ArrayCollection();
  98.         $this->tickets = new ArrayCollection();
  99.         $this->ticketRemboursements = new ArrayCollection();
  100.         $this->ficheLiaisons = new ArrayCollection();
  101.     }
  102.     public function getId(): ?int
  103.     {
  104.         return $this->id;
  105.     }
  106.     public function __toString()
  107.     {
  108.        return $this->getLibelle();
  109.     }
  110.     public function getNom(): ?string
  111.     {
  112.         return $this->nom;
  113.     }
  114.     public function setNom(?string $nom): self
  115.     {
  116.         $this->nom $nom;
  117.         return $this;
  118.     }
  119.     public function getCodepostal(): ?string
  120.     {
  121.         return $this->codepostal;
  122.     }
  123.     public function setCodepostal(?string $codepostal): self
  124.     {
  125.         $this->codepostal $codepostal;
  126.         return $this;
  127.     }
  128.     public function getVille(): ?string
  129.     {
  130.         return $this->ville;
  131.     }
  132.     public function setVille(?string $ville): self
  133.     {
  134.         $this->ville $ville;
  135.         return $this;
  136.     }
  137.     public function getLibelle(): ?string
  138.     {
  139.         return $this->libelle;
  140.     }
  141.     public function setLibelle(?string $libelle): self
  142.     {
  143.         $this->libelle $libelle;
  144.         return $this;
  145.     }
  146.     public function getDepartement(): ?int
  147.     {
  148.         return $this->departement;
  149.     }
  150.     public function setDepartement(?int $departement): self
  151.     {
  152.         $this->departement $departement;
  153.         return $this;
  154.     }
  155.     public function getAdresse(): ?string
  156.     {
  157.         return $this->adresse;
  158.     }
  159.     public function setAdresse(?string $adresse): self
  160.     {
  161.         $this->adresse $adresse;
  162.         return $this;
  163.     }
  164.     public function getMail(): ?string
  165.     {
  166.         return $this->mail;
  167.     }
  168.     public function setMail(?string $mail): self
  169.     {
  170.         $this->mail $mail;
  171.         return $this;
  172.     }
  173.     public function getGroupe(): ?string
  174.     {
  175.         return $this->groupe;
  176.     }
  177.     public function setGroupe(?string $groupe): self
  178.     {
  179.         $this->groupe $groupe;
  180.         return $this;
  181.     }
  182.     /**
  183.      * @return Collection<int, User>
  184.      */
  185.     public function getUsers(): Collection
  186.     {
  187.         return $this->users;
  188.     }
  189.     public function addUser(User $user): self
  190.     {
  191.         if (!$this->users->contains($user)) {
  192.             $this->users[] = $user;
  193.             $user->setCinema($this);
  194.         }
  195.         return $this;
  196.     }
  197.     public function removeUser(User $user): self
  198.     {
  199.         if ($this->users->removeElement($user)) {
  200.             // set the owning side to null (unless already changed)
  201.             if ($user->getCinema() === $this) {
  202.                 $user->setCinema(null);
  203.             }
  204.         }
  205.         return $this;
  206.     }
  207.     public function isConvention(): ?bool
  208.     {
  209.         return $this->convention;
  210.     }
  211.     public function setConvention(?bool $convention): self
  212.     {
  213.         $this->convention $convention;
  214.         return $this;
  215.     }
  216.     /**
  217.      * @return Collection<int, CinemaContact>
  218.      */
  219.     public function getCinemaContacts(): Collection
  220.     {
  221.         return $this->cinemaContacts;
  222.     }
  223.     public function addCinemaContact(CinemaContact $cinemaContact): self
  224.     {
  225.         if (!$this->cinemaContacts->contains($cinemaContact)) {
  226.             $this->cinemaContacts[] = $cinemaContact;
  227.             $cinemaContact->setCinema($this);
  228.         }
  229.         return $this;
  230.     }
  231.     public function removeCinemaContact(CinemaContact $cinemaContact): self
  232.     {
  233.         if ($this->cinemaContacts->removeElement($cinemaContact)) {
  234.             // set the owning side to null (unless already changed)
  235.             if ($cinemaContact->getCinema() === $this) {
  236.                 $cinemaContact->setCinema(null);
  237.             }
  238.         }
  239.         return $this;
  240.     }
  241.     public function getConventionDate(): ?\DateTimeInterface
  242.     {
  243.         return $this->conventionDate;
  244.     }
  245.     public function setConventionDate(?\DateTimeInterface $conventionDate): self
  246.     {
  247.         $this->conventionDate $conventionDate;
  248.         return $this;
  249.     }
  250.     public function getSecretScanner(): ?string
  251.     {
  252.         return $this->secretScanner;
  253.     }
  254.     public function setSecretScanner(?string $secretScanner): self
  255.     {
  256.         $this->secretScanner $secretScanner;
  257.         return $this;
  258.     }
  259.     public function getPasseursImages(): ?string
  260.     {
  261.         return $this->passeursImages;
  262.     }
  263.     public function setPasseursImages(?string $passeursImages): self
  264.     {
  265.         $this->passeursImages $passeursImages;
  266.         return $this;
  267.     }
  268.     /**
  269.      * @return Collection<int, Ticket>
  270.      */
  271.     public function getTickets(): Collection
  272.     {
  273.         return $this->tickets;
  274.     }
  275.     public function addTicket(Ticket $ticket): self
  276.     {
  277.         if (!$this->tickets->contains($ticket)) {
  278.             $this->tickets[] = $ticket;
  279.             $ticket->setCinema($this);
  280.         }
  281.         return $this;
  282.     }
  283.     public function removeTicket(Ticket $ticket): self
  284.     {
  285.         if ($this->tickets->removeElement($ticket)) {
  286.             // set the owning side to null (unless already changed)
  287.             if ($ticket->getCinema() === $this) {
  288.                 $ticket->setCinema(null);
  289.             }
  290.         }
  291.         return $this;
  292.     }
  293.     public function getConventionTarif(): ?float
  294.     {
  295.         return $this->conventionTarif;
  296.     }
  297.     public function setConventionTarif(?float $conventionTarif): self
  298.     {
  299.         $this->conventionTarif $conventionTarif;
  300.         return $this;
  301.     }
  302.     public function getConventionSignataire(): ?string
  303.     {
  304.         return $this->conventionSignataire;
  305.     }
  306.     public function setConventionSignataire(?string $conventionSignataire): self
  307.     {
  308.         $this->conventionSignataire $conventionSignataire;
  309.         return $this;
  310.     }
  311.     /**
  312.      * @return Collection<int, FicheLiaison>
  313.      */
  314.     public function getFicheLiaisons(): Collection
  315.     {
  316.         return $this->ficheLiaisons;
  317.     }
  318.     public function addFicheLiaison(FicheLiaison $ficheLiaison): self
  319.     {
  320.         if (!$this->ficheLiaisons->contains($ficheLiaison)) {
  321.             $this->ficheLiaisons[] = $ficheLiaison;
  322.             $ficheLiaison->setCinema($this);
  323.         }
  324.         return $this;
  325.     }
  326.     public function removeFicheLiaison(FicheLiaison $ficheLiaison): self
  327.     {
  328.         if ($this->ficheLiaisons->removeElement($ficheLiaison)) {
  329.             // set the owning side to null (unless already changed)
  330.             if ($ficheLiaison->getCinema() === $this) {
  331.                 $ficheLiaison->setCinema(null);
  332.             }
  333.         }
  334.         return $this;
  335.     }
  336.     public function getNbEntrees(): ?int
  337.     {
  338.         return $this->nbEntrees;
  339.     }
  340.     public function setNbEntrees(int $nbEntrees): self
  341.     {
  342.         $this->nbEntrees $nbEntrees;
  343.         return $this;
  344.     }
  345. }