<?php
namespace App\Entity\Gestiform\Admin;
use App\Entity\AbstractEntity;
use App\Entity\Gestiform\Admin\MasterListe\Masterlistelg;
use App\Entity\Gestiform\Formations\Reunion\Reunion;
use App\Entity\Gestiform\Formations\Session\SalleEvent;
use App\Repository\Gestiform\Admin\SalleRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=SalleRepository::class)
*/
class Salle extends AbstractEntity
{
/**
* @ORM\Column(type="string", length=255, nullable=false)
*/
private string $intitule;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private ?string $lieu=null;
/**
* @ORM\Column(type="integer",nullable=true)
*/
private ?int $capacite = null;
/**
* @ORM\ManyToOne(targetEntity=Masterlistelg::class)
* @ORM\JoinColumn(nullable=true)
*/
private ?Masterlistelg $niveauMateriel = null;
/**
* @ORM\Column(type="string", length=255,nullable=true)
*/
private ?string $uservituelid;
/**
* @ORM\Column(type="string", length=255,nullable=true)
*/
private ?string $sallevirtuelleid;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private ?string $logocouleur = null;
/**
* @ORM\Column(type="string", length=255,nullable=true)
*/
private ?string $lienvirtuel;
/**
* @ORM\Column(type="boolean",nullable=true)
*/
private bool $reservee = false;
/**
* @ORM\ManyToOne(targetEntity=Site::class, inversedBy="salles")
* @ORM\JoinColumn(nullable=true)
*/
private ?Site $site = null;
/**
* @ORM\OneToMany(targetEntity=Reunion::class, mappedBy="salle",cascade={"persist"})
*/
private Collection $reunions;
/**
* @ORM\OneToMany(targetEntity=SalleEvent::class, mappedBy="event", cascade={"persist", "remove"})
*/
private Collection $salleEvents;
public function __construct()
{
$this->reunions = new ArrayCollection();
$this->salleEvents = new ArrayCollection();
}
public function getIntitule(): ?string
{
return $this->intitule;
}
public function setIntitule(string $intitule): self
{
$this->intitule = $intitule;
return $this;
}
public function getLogocouleur(): ?string
{
return $this->logocouleur;
}
public function setLogocouleur(?string $logocouleur): self
{
$this->logocouleur = $logocouleur;
return $this;
}
public function getCapacite(): ?int
{
return $this->capacite;
}
public function setCapacite(?int $capacite): self
{
$this->capacite = $capacite;
return $this;
}
public function getNiveauMateriel(): ?Masterlistelg
{
return $this->niveauMateriel;
}
public function setNiveauMateriel(?Masterlistelg $niveauMateriel): self
{
$this->niveauMateriel = $niveauMateriel;
return $this;
}
public function getUservituelid(): ?string
{
return $this->uservituelid;
}
public function setUservituelid(?string $uservituelid): self
{
$this->uservituelid = $uservituelid;
return $this;
}
public function getSallevirtuelleid(): ?string
{
return $this->sallevirtuelleid;
}
public function setSallevirtuelleid(?string $sallevirtuelleid): self
{
$this->sallevirtuelleid = $sallevirtuelleid;
return $this;
}
public function getLienvirtuel(): ?string
{
return $this->lienvirtuel;
}
public function setLienvirtuel(?string $lienvirtuel): self
{
$this->lienvirtuel = $lienvirtuel;
return $this;
}
public function isReservee(): ?bool
{
return $this->reservee;
}
public function setReservee(?bool $reservee): self
{
$this->reservee = $reservee;
return $this;
}
public function getSite(): ?Site
{
return $this->site;
}
public function setSite(?Site $site): self
{
$this->site = $site;
return $this;
}
/**
* @return Collection<int, Reunion>
*/
public function getReunions(): Collection
{
return $this->reunions;
}
public function addReunion(Reunion $reunion): self
{
if (!$this->reunions->contains($reunion)) {
$this->reunions->add($reunion);
$reunion->setSalle($this);
}
return $this;
}
public function removeReunion(Reunion $reunion): self
{
if ($this->reunions->removeElement($reunion)) {
// set the owning side to null (unless already changed)
if ($reunion->getSalle() === $this) {
$reunion->setSalle(null);
}
}
return $this;
}
public function getSallesEvents(): Collection
{
return $this->salleEvents;
}
public function addSalleEvent(SalleEvent $salleEvent): self
{
if (!$this->salleEvents->contains($salleEvent)) {
$this->salleEvents->add($salleEvent);
$salleEvent->setSalle($this);
}
return $this;
}
public function removeSalleEvent(SalleEvent $salleEvent): self
{
if ($this->salleEvents->removeElement($salleEvent)) {
// set the owning side to null (unless already changed)
if ($salleEvent->getSalle() === $this) {
$salleEvent->setSalle(null);
}
}
return $this;
}
public function getLieu(): ?string
{
return $this->lieu;
}
public function setLieu(?string $lieu): self
{
$this->lieu = $lieu;
return $this;
}
}