<?php
namespace App\Entity;
use App\Repository\EvenementsRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=EvenementsRepository::class)
*/
class Evenements
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $Titre;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $Description;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $Image;
/**
* @ORM\ManyToOne(targetEntity=CategoriesEvenements::class, inversedBy="evenements")
*/
private $CategoriesEvenements;
/**
* @ORM\Column(type="date", nullable=true)
*/
private $Date;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $Billeterie;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $Lieu;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $NbPlaces;
/**
* @ORM\OneToMany(targetEntity=Reservations::class, mappedBy="Evenements")
*/
private $reservations;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $Prix;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $Archive;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $Resume;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $Heure;
/**
* @ORM\ManyToOne(targetEntity=Evenements::class, inversedBy="evenements")
*/
private $Evenements;
/**
* @ORM\OneToMany(targetEntity=Evenements::class, mappedBy="Evenements")
*/
private $evenements;
public function __construct()
{
$this->reservations = new ArrayCollection();
$this->evenements = new ArrayCollection();
}
public function __toString()
{
return $this->getTitre();
}
public function getId(): ?int
{
return $this->id;
}
public function getTitre(): ?string
{
return $this->Titre;
}
public function setTitre(?string $Titre): self
{
$this->Titre = $Titre;
return $this;
}
public function getDescription(): ?string
{
return $this->Description;
}
public function setDescription(?string $Description): self
{
$this->Description = $Description;
return $this;
}
public function getImage(): ?string
{
return $this->Image;
}
public function setImage(?string $Image): self
{
$this->Image = $Image;
return $this;
}
public function getCategoriesEvenements(): ?CategoriesEvenements
{
return $this->CategoriesEvenements;
}
public function setCategoriesEvenements(?CategoriesEvenements $CategoriesEvenements): self
{
$this->CategoriesEvenements = $CategoriesEvenements;
return $this;
}
public function getDate(): ?\DateTimeInterface
{
return $this->Date;
}
public function setDate(?\DateTimeInterface $Date): self
{
$this->Date = $Date;
return $this;
}
public function getBilleterie(): ?string
{
return $this->Billeterie;
}
public function setBilleterie(?string $Billeterie): self
{
$this->Billeterie = $Billeterie;
return $this;
}
public function getLieu(): ?string
{
return $this->Lieu;
}
public function setLieu(?string $Lieu): self
{
$this->Lieu = $Lieu;
return $this;
}
public function getNbPlaces(): ?int
{
return $this->NbPlaces;
}
public function setNbPlaces(?int $NbPlaces): self
{
$this->NbPlaces = $NbPlaces;
return $this;
}
/**
* @return Collection<int, Reservations>
*/
public function getReservations(): Collection
{
return $this->reservations;
}
public function addReservation(Reservations $reservation): self
{
if (!$this->reservations->contains($reservation)) {
$this->reservations[] = $reservation;
$reservation->setEvenements($this);
}
return $this;
}
public function removeReservation(Reservations $reservation): self
{
if ($this->reservations->removeElement($reservation)) {
// set the owning side to null (unless already changed)
if ($reservation->getEvenements() === $this) {
$reservation->setEvenements(null);
}
}
return $this;
}
public function getPrix(): ?int
{
return $this->Prix;
}
public function setPrix(?int $Prix): self
{
$this->Prix = $Prix;
return $this;
}
public function getArchive(): ?int
{
return $this->Archive;
}
public function setArchive(?int $Archive): self
{
$this->Archive = $Archive;
return $this;
}
public function getResume(): ?string
{
return $this->Resume;
}
public function setResume(?string $Resume): self
{
$this->Resume = $Resume;
return $this;
}
public function getHeure(): ?string
{
return $this->Heure;
}
public function setHeure(?string $Heure): self
{
$this->Heure = $Heure;
return $this;
}
public function getEvenements(): ?self
{
return $this->Evenements;
}
public function setEvenements(?self $Evenements): self
{
$this->Evenements = $Evenements;
return $this;
}
public function addEvenement(self $evenement): self
{
if (!$this->evenements->contains($evenement)) {
$this->evenements[] = $evenement;
$evenement->setEvenements($this);
}
return $this;
}
public function removeEvenement(self $evenement): self
{
if ($this->evenements->removeElement($evenement)) {
// set the owning side to null (unless already changed)
if ($evenement->getEvenements() === $this) {
$evenement->setEvenements(null);
}
}
return $this;
}
}