<?php
namespace App\Entity;
use App\Repository\CinemaRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=CinemaRepository::class)
*/
class Cinema
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $nom;
/**
* @ORM\Column(type="string", length=10, nullable=true)
*/
private $codepostal;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $ville;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $libelle;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $departement;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $adresse;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $mail;
/**
* @ORM\Column(type="string", length=50, nullable=true)
*/
private $groupe;
/**
* @ORM\OneToMany(targetEntity=User::class, mappedBy="cinema")
*/
private $users;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $convention;
/**
* @ORM\OneToMany(targetEntity=CinemaContact::class, mappedBy="cinema")
*/
private $cinemaContacts;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $conventionDate;
/**
* @ORM\Column(type="string", length=50, nullable=true)
*/
private $secretScanner;
/**
* @ORM\Column(type="string", length=15, nullable=true)
*/
private $passeursImages;
/**
* @ORM\OneToMany(targetEntity=Ticket::class, mappedBy="cinema")
*/
private $tickets;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $conventionTarif;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $conventionSignataire;
/**
* @ORM\OneToMany(targetEntity=FicheLiaison::class, mappedBy="cinema")
*/
private $ficheLiaisons;
/**
* @ORM\Column(type="integer")
*/
private $nbEntrees;
public function __construct()
{
$this->users = new ArrayCollection();
$this->cinemaContacts = new ArrayCollection();
$this->tickets = new ArrayCollection();
$this->ticketRemboursements = new ArrayCollection();
$this->ficheLiaisons = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function __toString()
{
return $this->getLibelle();
}
public function getNom(): ?string
{
return $this->nom;
}
public function setNom(?string $nom): self
{
$this->nom = $nom;
return $this;
}
public function getCodepostal(): ?string
{
return $this->codepostal;
}
public function setCodepostal(?string $codepostal): self
{
$this->codepostal = $codepostal;
return $this;
}
public function getVille(): ?string
{
return $this->ville;
}
public function setVille(?string $ville): self
{
$this->ville = $ville;
return $this;
}
public function getLibelle(): ?string
{
return $this->libelle;
}
public function setLibelle(?string $libelle): self
{
$this->libelle = $libelle;
return $this;
}
public function getDepartement(): ?int
{
return $this->departement;
}
public function setDepartement(?int $departement): self
{
$this->departement = $departement;
return $this;
}
public function getAdresse(): ?string
{
return $this->adresse;
}
public function setAdresse(?string $adresse): self
{
$this->adresse = $adresse;
return $this;
}
public function getMail(): ?string
{
return $this->mail;
}
public function setMail(?string $mail): self
{
$this->mail = $mail;
return $this;
}
public function getGroupe(): ?string
{
return $this->groupe;
}
public function setGroupe(?string $groupe): self
{
$this->groupe = $groupe;
return $this;
}
/**
* @return Collection<int, User>
*/
public function getUsers(): Collection
{
return $this->users;
}
public function addUser(User $user): self
{
if (!$this->users->contains($user)) {
$this->users[] = $user;
$user->setCinema($this);
}
return $this;
}
public function removeUser(User $user): self
{
if ($this->users->removeElement($user)) {
// set the owning side to null (unless already changed)
if ($user->getCinema() === $this) {
$user->setCinema(null);
}
}
return $this;
}
public function isConvention(): ?bool
{
return $this->convention;
}
public function setConvention(?bool $convention): self
{
$this->convention = $convention;
return $this;
}
/**
* @return Collection<int, CinemaContact>
*/
public function getCinemaContacts(): Collection
{
return $this->cinemaContacts;
}
public function addCinemaContact(CinemaContact $cinemaContact): self
{
if (!$this->cinemaContacts->contains($cinemaContact)) {
$this->cinemaContacts[] = $cinemaContact;
$cinemaContact->setCinema($this);
}
return $this;
}
public function removeCinemaContact(CinemaContact $cinemaContact): self
{
if ($this->cinemaContacts->removeElement($cinemaContact)) {
// set the owning side to null (unless already changed)
if ($cinemaContact->getCinema() === $this) {
$cinemaContact->setCinema(null);
}
}
return $this;
}
public function getConventionDate(): ?\DateTimeInterface
{
return $this->conventionDate;
}
public function setConventionDate(?\DateTimeInterface $conventionDate): self
{
$this->conventionDate = $conventionDate;
return $this;
}
public function getSecretScanner(): ?string
{
return $this->secretScanner;
}
public function setSecretScanner(?string $secretScanner): self
{
$this->secretScanner = $secretScanner;
return $this;
}
public function getPasseursImages(): ?string
{
return $this->passeursImages;
}
public function setPasseursImages(?string $passeursImages): self
{
$this->passeursImages = $passeursImages;
return $this;
}
/**
* @return Collection<int, Ticket>
*/
public function getTickets(): Collection
{
return $this->tickets;
}
public function addTicket(Ticket $ticket): self
{
if (!$this->tickets->contains($ticket)) {
$this->tickets[] = $ticket;
$ticket->setCinema($this);
}
return $this;
}
public function removeTicket(Ticket $ticket): self
{
if ($this->tickets->removeElement($ticket)) {
// set the owning side to null (unless already changed)
if ($ticket->getCinema() === $this) {
$ticket->setCinema(null);
}
}
return $this;
}
public function getConventionTarif(): ?float
{
return $this->conventionTarif;
}
public function setConventionTarif(?float $conventionTarif): self
{
$this->conventionTarif = $conventionTarif;
return $this;
}
public function getConventionSignataire(): ?string
{
return $this->conventionSignataire;
}
public function setConventionSignataire(?string $conventionSignataire): self
{
$this->conventionSignataire = $conventionSignataire;
return $this;
}
/**
* @return Collection<int, FicheLiaison>
*/
public function getFicheLiaisons(): Collection
{
return $this->ficheLiaisons;
}
public function addFicheLiaison(FicheLiaison $ficheLiaison): self
{
if (!$this->ficheLiaisons->contains($ficheLiaison)) {
$this->ficheLiaisons[] = $ficheLiaison;
$ficheLiaison->setCinema($this);
}
return $this;
}
public function removeFicheLiaison(FicheLiaison $ficheLiaison): self
{
if ($this->ficheLiaisons->removeElement($ficheLiaison)) {
// set the owning side to null (unless already changed)
if ($ficheLiaison->getCinema() === $this) {
$ficheLiaison->setCinema(null);
}
}
return $this;
}
public function getNbEntrees(): ?int
{
return $this->nbEntrees;
}
public function setNbEntrees(int $nbEntrees): self
{
$this->nbEntrees = $nbEntrees;
return $this;
}
}