<?php
namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiResource;
use App\Repository\VirtualClassroomRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: VirtualClassroomRepository::class)]
#[ApiResource]
class VirtualClassroom
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $titre = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $description = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $lienmeet = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $date = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $heureDebut = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $heureFin = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $support = null;
#[ORM\OneToMany(mappedBy: 'virtualclassroom', targetEntity: Support::class,cascade: ['remove'])]
private Collection $supports;
#[ORM\Column(length: 255, nullable: true)]
private ?string $drive = null;
#[ORM\ManyToOne(inversedBy: 'virtualClassrooms')]
private ?Evenement $session = null;
#[ORM\ManyToOne(inversedBy: 'virtualClassrooms')]
private ?User $formateur = null;
#[ORM\OneToMany(mappedBy: 'virtualclass', targetEntity: Qcmcalssroom::class,cascade: ['remove'])]
private Collection $qcmcalssrooms;
#[ORM\OneToMany(mappedBy: 'virtualclass', targetEntity: Videoclassroom::class,cascade: ['remove'])]
private Collection $videoclassrooms;
#[ORM\OneToMany(mappedBy: 'classevirtuelle', targetEntity: Signature::class,cascade: ['remove'])]
private Collection $signatures;
public function __construct()
{
$this->supports = new ArrayCollection();
$this->qcmcalssrooms = new ArrayCollection();
$this->videoclassrooms = new ArrayCollection();
$this->signatures = new ArrayCollection();
}
public function __toString(): string
{
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 getLienmeet(): ?string
{
return $this->lienmeet;
}
public function setLienmeet(?string $lienmeet): self
{
$this->lienmeet = $lienmeet;
return $this;
}
public function getDate(): ?\DateTimeInterface
{
return $this->date;
}
public function setDate(?\DateTimeInterface $date): self
{
$this->date = $date;
return $this;
}
public function getHeureDebut(): ?\DateTimeInterface
{
return $this->heureDebut;
}
public function setHeureDebut(?\DateTimeInterface $heureDebut): self
{
$this->heureDebut = $heureDebut;
return $this;
}
public function getHeureFin(): ?\DateTimeInterface
{
return $this->heureFin;
}
public function setHeureFin(?\DateTimeInterface $heureFin): self
{
$this->heureFin = $heureFin;
return $this;
}
public function getSupport(): ?\DateTimeInterface
{
return $this->support;
}
public function setSupport(?\DateTimeInterface $support): self
{
$this->support = $support;
return $this;
}
/**
* @return Collection<int, Support>
*/
public function getSupports(): Collection
{
return $this->supports;
}
public function addSupport(Support $support): self
{
if (!$this->supports->contains($support)) {
$this->supports->add($support);
$support->setVirtualclassroom($this);
}
return $this;
}
public function removeSupport(Support $support): self
{
if ($this->supports->removeElement($support)) {
// set the owning side to null (unless already changed)
if ($support->getVirtualclassroom() === $this) {
$support->setVirtualclassroom(null);
}
}
return $this;
}
public function getDrive(): ?string
{
return $this->drive;
}
public function setDrive(?string $drive): self
{
$this->drive = $drive;
return $this;
}
public function getSession(): ?Evenement
{
return $this->session;
}
public function setSession(?Evenement $session): self
{
$this->session = $session;
return $this;
}
public function getFormateur(): ?User
{
return $this->formateur;
}
public function setFormateur(?User $formateur): self
{
$this->formateur = $formateur;
return $this;
}
/**
* @return Collection<int, Qcmcalssroom>
*/
public function getQcmcalssrooms(): Collection
{
return $this->qcmcalssrooms;
}
public function addQcmcalssroom(Qcmcalssroom $qcmcalssroom): self
{
if (!$this->qcmcalssrooms->contains($qcmcalssroom)) {
$this->qcmcalssrooms->add($qcmcalssroom);
$qcmcalssroom->setVirtualclass($this);
}
return $this;
}
public function removeQcmcalssroom(Qcmcalssroom $qcmcalssroom): self
{
if ($this->qcmcalssrooms->removeElement($qcmcalssroom)) {
// set the owning side to null (unless already changed)
if ($qcmcalssroom->getVirtualclass() === $this) {
$qcmcalssroom->setVirtualclass(null);
}
}
return $this;
}
/**
* @return Collection<int, Videoclassroom>
*/
public function getVideoclassrooms(): Collection
{
return $this->videoclassrooms;
}
public function addVideoclassroom(Videoclassroom $videoclassroom): self
{
if (!$this->videoclassrooms->contains($videoclassroom)) {
$this->videoclassrooms->add($videoclassroom);
$videoclassroom->setVirtualclass($this);
}
return $this;
}
public function removeVideoclassroom(Videoclassroom $videoclassroom): self
{
if ($this->videoclassrooms->removeElement($videoclassroom)) {
// set the owning side to null (unless already changed)
if ($videoclassroom->getVirtualclass() === $this) {
$videoclassroom->setVirtualclass(null);
}
}
return $this;
}
/**
* @return Collection<int, Signature>
*/
public function getSignatures(): Collection
{
return $this->signatures;
}
public function addSignature(Signature $signature): self
{
if (!$this->signatures->contains($signature)) {
$this->signatures->add($signature);
$signature->setClassevirtuelle($this);
}
return $this;
}
public function removeSignature(Signature $signature): self
{
if ($this->signatures->removeElement($signature)) {
// set the owning side to null (unless already changed)
if ($signature->getClassevirtuelle() === $this) {
$signature->setClassevirtuelle(null);
}
}
return $this;
}
}