src/Entity/Gestiform/Admin/Salle.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gestiform\Admin;
  3. use App\Entity\AbstractEntity;
  4. use App\Entity\Gestiform\Admin\MasterListe\Masterlistelg;
  5. use App\Entity\Gestiform\Formations\Reunion\Reunion;
  6. use App\Entity\Gestiform\Formations\Session\SalleEvent;
  7. use App\Repository\Gestiform\Admin\SalleRepository;
  8. use Doctrine\Common\Collections\ArrayCollection;
  9. use Doctrine\Common\Collections\Collection;
  10. use Doctrine\ORM\Mapping as ORM;
  11. /**
  12.  * @ORM\Entity(repositoryClass=SalleRepository::class)
  13.  */
  14. class Salle extends AbstractEntity
  15. {
  16.     /**
  17.      * @ORM\Column(type="string", length=255, nullable=false)
  18.      */
  19.     private string $intitule;
  20.     /**
  21.      * @ORM\Column(type="string", length=255, nullable=true)
  22.      */
  23.     private ?string $lieu=null;
  24.     /**
  25.      * @ORM\Column(type="integer",nullable=true)
  26.      */
  27.     private ?int $capacite null;
  28.     /**
  29.      * @ORM\ManyToOne(targetEntity=Masterlistelg::class)
  30.      * @ORM\JoinColumn(nullable=true)
  31.      */
  32.     private ?Masterlistelg $niveauMateriel null;
  33.     /**
  34.      * @ORM\Column(type="string", length=255,nullable=true)
  35.      */
  36.     private ?string $uservituelid;
  37.     /**
  38.      * @ORM\Column(type="string", length=255,nullable=true)
  39.      */
  40.     private ?string $sallevirtuelleid;
  41.     /**
  42.      * @ORM\Column(type="string", length=255, nullable=true)
  43.      */
  44.     private ?string $logocouleur null;
  45.     /**
  46.      * @ORM\Column(type="string", length=255,nullable=true)
  47.      */
  48.     private ?string $lienvirtuel;
  49.     /**
  50.      * @ORM\Column(type="boolean",nullable=true)
  51.      */
  52.     private bool $reservee false;
  53.     /**
  54.      * @ORM\ManyToOne(targetEntity=Site::class, inversedBy="salles")
  55.      * @ORM\JoinColumn(nullable=true)
  56.      */
  57.     private ?Site $site null;
  58.     /**
  59.      * @ORM\OneToMany(targetEntity=Reunion::class, mappedBy="salle",cascade={"persist"})
  60.      */
  61.     private Collection $reunions;
  62.     /**
  63.      * @ORM\OneToMany(targetEntity=SalleEvent::class, mappedBy="event", cascade={"persist", "remove"})
  64.      */
  65.     private Collection $salleEvents;
  66.     public function __construct()
  67.     {
  68.         $this->reunions = new ArrayCollection();
  69.         $this->salleEvents = new ArrayCollection();
  70.     }
  71.     public function getIntitule(): ?string
  72.     {
  73.         return $this->intitule;
  74.     }
  75.     public function setIntitule(string $intitule): self
  76.     {
  77.         $this->intitule $intitule;
  78.         return $this;
  79.     }
  80.     public function getLogocouleur(): ?string
  81.     {
  82.         return $this->logocouleur;
  83.     }
  84.     public function setLogocouleur(?string $logocouleur): self
  85.     {
  86.         $this->logocouleur $logocouleur;
  87.         return $this;
  88.     }
  89.     public function getCapacite(): ?int
  90.     {
  91.         return $this->capacite;
  92.     }
  93.     public function setCapacite(?int $capacite): self
  94.     {
  95.         $this->capacite $capacite;
  96.         return $this;
  97.     }
  98.     public function getNiveauMateriel(): ?Masterlistelg
  99.     {
  100.         return $this->niveauMateriel;
  101.     }
  102.     public function setNiveauMateriel(?Masterlistelg $niveauMateriel): self
  103.     {
  104.         $this->niveauMateriel $niveauMateriel;
  105.         return $this;
  106.     }
  107.     public function getUservituelid(): ?string
  108.     {
  109.         return $this->uservituelid;
  110.     }
  111.     public function setUservituelid(?string $uservituelid): self
  112.     {
  113.         $this->uservituelid $uservituelid;
  114.         return $this;
  115.     }
  116.     public function getSallevirtuelleid(): ?string
  117.     {
  118.         return $this->sallevirtuelleid;
  119.     }
  120.     public function setSallevirtuelleid(?string $sallevirtuelleid): self
  121.     {
  122.         $this->sallevirtuelleid $sallevirtuelleid;
  123.         return $this;
  124.     }
  125.     public function getLienvirtuel(): ?string
  126.     {
  127.         return $this->lienvirtuel;
  128.     }
  129.     public function setLienvirtuel(?string $lienvirtuel): self
  130.     {
  131.         $this->lienvirtuel $lienvirtuel;
  132.         return $this;
  133.     }
  134.     public function isReservee(): ?bool
  135.     {
  136.         return $this->reservee;
  137.     }
  138.     public function setReservee(?bool $reservee): self
  139.     {
  140.         $this->reservee $reservee;
  141.         return $this;
  142.     }
  143.     public function getSite(): ?Site
  144.     {
  145.         return $this->site;
  146.     }
  147.     public function setSite(?Site $site): self
  148.     {
  149.         $this->site $site;
  150.         return $this;
  151.     }
  152.     /**
  153.      * @return Collection<int, Reunion>
  154.      */
  155.     public function getReunions(): Collection
  156.     {
  157.         return $this->reunions;
  158.     }
  159.     public function addReunion(Reunion $reunion): self
  160.     {
  161.         if (!$this->reunions->contains($reunion)) {
  162.             $this->reunions->add($reunion);
  163.             $reunion->setSalle($this);
  164.         }
  165.         return $this;
  166.     }
  167.     public function removeReunion(Reunion $reunion): self
  168.     {
  169.         if ($this->reunions->removeElement($reunion)) {
  170.             // set the owning side to null (unless already changed)
  171.             if ($reunion->getSalle() === $this) {
  172.                 $reunion->setSalle(null);
  173.             }
  174.         }
  175.         return $this;
  176.     }
  177.     public function getSallesEvents(): Collection
  178.     {
  179.         return $this->salleEvents;
  180.     }
  181.     public function addSalleEvent(SalleEvent $salleEvent): self
  182.     {
  183.         if (!$this->salleEvents->contains($salleEvent)) {
  184.             $this->salleEvents->add($salleEvent);
  185.             $salleEvent->setSalle($this);
  186.         }
  187.         return $this;
  188.     }
  189.     public function removeSalleEvent(SalleEvent $salleEvent): self
  190.     {
  191.         if ($this->salleEvents->removeElement($salleEvent)) {
  192.             // set the owning side to null (unless already changed)
  193.             if ($salleEvent->getSalle() === $this) {
  194.                 $salleEvent->setSalle(null);
  195.             }
  196.         }
  197.         return $this;
  198.     }
  199.     public function getLieu(): ?string
  200.     {
  201.         return $this->lieu;
  202.     }
  203.     public function setLieu(?string $lieu): self
  204.     {
  205.         $this->lieu $lieu;
  206.         return $this;
  207.     }
  208. }