<?php
namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiResource;
use App\Repository\EvenementRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: EvenementRepository::class)]
#[ApiResource]
class Evenement
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $image = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $titre = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $descriptionshort = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $description = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $adresse = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $starttime = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $endtime = null;
#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]
private ?\DateTimeInterface $date = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $imgdetail = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $mode = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $slug = null;
#[ORM\OneToMany(mappedBy: 'session', targetEntity: InscritSession::class,cascade: ['remove'])]
private Collection $inscritSessions;
#[ORM\ManyToOne(inversedBy: 'evenements')]
private ?Formation $formation = null;
#[ORM\OneToMany(mappedBy: 'session', targetEntity: Reglement::class,cascade: ['remove'])]
private Collection $reglements;
#[ORM\ManyToOne(inversedBy: 'evenements')]
private ?User $formateur = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $liendrive = null;
#[ORM\OneToMany(mappedBy: 'session', targetEntity: VirtualClassroom::class,cascade: ['remove'])]
private Collection $virtualClassrooms;
#[ORM\OneToMany(mappedBy: 'session', targetEntity: Reclamation::class,cascade: ['remove'])]
private Collection $reclamations;
#[ORM\OneToMany(mappedBy: 'evenement', targetEntity: Evaluation::class,cascade: ['remove'])]
private Collection $eval;
#[ORM\Column(length: 255, nullable: true)]
private ?string $type = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $prixpromo = null;
#[ORM\OneToMany(mappedBy: 'utilisationsession', targetEntity: Utilisation::class,cascade: ['remove'])]
private Collection $utilisations;
#[ORM\Column(length: 255, nullable: true)]
private ?string $certeficatvierge = null;
#[ORM\OneToMany(mappedBy: 'session', targetEntity: Trace::class,cascade: ['remove'])]
private Collection $traces;
#[ORM\Column(nullable: true)]
private ?bool $isArchive = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $imgprog = null;
#[ORM\OneToMany(mappedBy: 'session', targetEntity: EmailSession::class,cascade: ['remove'])]
private Collection $emailSessions;
#[ORM\OneToMany(mappedBy: 'session', targetEntity: EmailStudent::class,cascade: ['remove'])]
private Collection $emailStudents;
#[ORM\Column(length: 255, nullable: true)]
private ?string $liengithub = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $lienprog = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $discord = null;
#[ORM\OneToMany(mappedBy: 'session', targetEntity: NotificationSession::class)]
private Collection $notificationSessions;
#[ORM\OneToMany(mappedBy: 'evenement', targetEntity: LotCoupon::class)]
private Collection $lotCoupons;
public function __construct()
{
$this->inscritSessions = new ArrayCollection();
$this->reglements = new ArrayCollection();
$this->virtualClassrooms = new ArrayCollection();
$this->reclamations = new ArrayCollection();
$this->eval = new ArrayCollection();
$this->utilisations = new ArrayCollection();
$this->traces = new ArrayCollection();
$this->emailSessions = new ArrayCollection();
$this->emailStudents = new ArrayCollection();
$this->notificationSessions = new ArrayCollection();
$this->lotCoupons = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getImage(): ?string
{
return $this->image;
}
public function setImage(?string $image): self
{
$this->image = $image;
return $this;
}
public function getTitre(): ?string
{
return $this->titre;
}
public function setTitre(?string $titre): self
{
$this->titre = $titre;
return $this;
}
public function getDescriptionshort(): ?string
{
return $this->descriptionshort;
}
public function setDescriptionshort(?string $descriptionshort): self
{
$this->descriptionshort = $descriptionshort;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function getAdresse(): ?string
{
return $this->adresse;
}
public function setAdresse(?string $adresse): self
{
$this->adresse = $adresse;
return $this;
}
public function getStarttime(): ?\DateTimeInterface
{
return $this->starttime;
}
public function setStarttime(?\DateTimeInterface $starttime): self
{
$this->starttime = $starttime;
return $this;
}
public function getEndtime(): ?\DateTimeInterface
{
return $this->endtime;
}
public function setEndtime(?\DateTimeInterface $endtime): self
{
$this->endtime = $endtime;
return $this;
}
public function getDate(): ?\DateTimeInterface
{
return $this->date;
}
public function setDate(?\DateTimeInterface $date): self
{
$this->date = $date;
return $this;
}
public function getImgdetail(): ?string
{
return $this->imgdetail;
}
public function setImgdetail(?string $imgdetail): self
{
$this->imgdetail = $imgdetail;
return $this;
}
public function getMode(): ?string
{
return $this->mode;
}
public function setMode(?string $mode): self
{
$this->mode = $mode;
return $this;
}
public function getSlug(): ?string
{
return $this->slug;
}
public function setSlug(?string $slug): self
{
$this->slug = $slug;
return $this;
}
/**
* @return Collection<int, InscritSession>
*/
public function getInscritSessions(): Collection
{
return $this->inscritSessions;
}
public function addInscritSession(InscritSession $inscritSession): self
{
if (!$this->inscritSessions->contains($inscritSession)) {
$this->inscritSessions->add($inscritSession);
$inscritSession->setSession($this);
}
return $this;
}
public function removeInscritSession(InscritSession $inscritSession): self
{
if ($this->inscritSessions->removeElement($inscritSession)) {
// set the owning side to null (unless already changed)
if ($inscritSession->getSession() === $this) {
$inscritSession->setSession(null);
}
}
return $this;
}
public function getFormation(): ?Formation
{
return $this->formation;
}
public function setFormation(?Formation $formation): self
{
$this->formation = $formation;
return $this;
}
/**
* @return Collection<int, Reglement>
*/
public function getReglements(): Collection
{
return $this->reglements;
}
public function addReglement(Reglement $reglement): self
{
if (!$this->reglements->contains($reglement)) {
$this->reglements->add($reglement);
$reglement->setSession($this);
}
return $this;
}
public function removeReglement(Reglement $reglement): self
{
if ($this->reglements->removeElement($reglement)) {
// set the owning side to null (unless already changed)
if ($reglement->getSession() === $this) {
$reglement->setSession(null);
}
}
return $this;
}
public function getFormateur(): ?User
{
return $this->formateur;
}
public function setFormateur(?User $formateur): self
{
$this->formateur = $formateur;
return $this;
}
public function getLiendrive(): ?string
{
return $this->liendrive;
}
public function setLiendrive(?string $liendrive): self
{
$this->liendrive = $liendrive;
return $this;
}
/**
* @return Collection<int, VirtualClassroom>
*/
public function getVirtualClassrooms(): Collection
{
return $this->virtualClassrooms;
}
public function addVirtualClassroom(VirtualClassroom $virtualClassroom): self
{
if (!$this->virtualClassrooms->contains($virtualClassroom)) {
$this->virtualClassrooms->add($virtualClassroom);
$virtualClassroom->setSession($this);
}
return $this;
}
public function removeVirtualClassroom(VirtualClassroom $virtualClassroom): self
{
if ($this->virtualClassrooms->removeElement($virtualClassroom)) {
// set the owning side to null (unless already changed)
if ($virtualClassroom->getSession() === $this) {
$virtualClassroom->setSession(null);
}
}
return $this;
}
/**
* @return Collection<int, Reclamation>
*/
public function getReclamations(): Collection
{
return $this->reclamations;
}
public function addReclamation(Reclamation $reclamation): self
{
if (!$this->reclamations->contains($reclamation)) {
$this->reclamations->add($reclamation);
$reclamation->setSession($this);
}
return $this;
}
public function removeReclamation(Reclamation $reclamation): self
{
if ($this->reclamations->removeElement($reclamation)) {
// set the owning side to null (unless already changed)
if ($reclamation->getSession() === $this) {
$reclamation->setSession(null);
}
}
return $this;
}
/**
* @return Collection<int, Evaluation>
*/
public function getEval(): Collection
{
return $this->eval;
}
public function addEval(Evaluation $eval): self
{
if (!$this->eval->contains($eval)) {
$this->eval->add($eval);
$eval->setEvenement($this);
}
return $this;
}
public function removeEval(Evaluation $eval): self
{
if ($this->eval->removeElement($eval)) {
// set the owning side to null (unless already changed)
if ($eval->getEvenement() === $this) {
$eval->setEvenement(null);
}
}
return $this;
}
public function __toString(): string
{
return $this->titre;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(?string $type): self
{
$this->type = $type;
return $this;
}
public function getPrixpromo(): ?string
{
return $this->prixpromo;
}
public function setPrixpromo(?string $prixpromo): self
{
$this->prixpromo = $prixpromo;
return $this;
}
/**
* @return Collection<int, Utilisation>
*/
public function getUtilisations(): Collection
{
return $this->utilisations;
}
public function addUtilisation(Utilisation $utilisation): self
{
if (!$this->utilisations->contains($utilisation)) {
$this->utilisations->add($utilisation);
$utilisation->setUtilisationsession($this);
}
return $this;
}
public function removeUtilisation(Utilisation $utilisation): self
{
if ($this->utilisations->removeElement($utilisation)) {
// set the owning side to null (unless already changed)
if ($utilisation->getUtilisationsession() === $this) {
$utilisation->setUtilisationsession(null);
}
}
return $this;
}
public function getCerteficatvierge(): ?string
{
return $this->certeficatvierge;
}
public function setCerteficatvierge(?string $certeficatvierge): self
{
$this->certeficatvierge = $certeficatvierge;
return $this;
}
/**
* @return Collection<int, Trace>
*/
public function getTraces(): Collection
{
return $this->traces;
}
public function addTrace(Trace $trace): self
{
if (!$this->traces->contains($trace)) {
$this->traces->add($trace);
$trace->setSession($this);
}
return $this;
}
public function removeTrace(Trace $trace): self
{
if ($this->traces->removeElement($trace)) {
// set the owning side to null (unless already changed)
if ($trace->getSession() === $this) {
$trace->setSession(null);
}
}
return $this;
}
public function isIsArchive(): ?bool
{
return $this->isArchive;
}
public function setIsArchive(?bool $isArchive): self
{
$this->isArchive = $isArchive;
return $this;
}
public function getImgprog(): ?string
{
return $this->imgprog;
}
public function setImgprog(?string $imgprog): self
{
$this->imgprog = $imgprog;
return $this;
}
/**
* @return Collection<int, EmailSession>
*/
public function getEmailSessions(): Collection
{
return $this->emailSessions;
}
public function addEmailSession(EmailSession $emailSession): self
{
if (!$this->emailSessions->contains($emailSession)) {
$this->emailSessions->add($emailSession);
$emailSession->setSession($this);
}
return $this;
}
public function removeEmailSession(EmailSession $emailSession): self
{
if ($this->emailSessions->removeElement($emailSession)) {
// set the owning side to null (unless already changed)
if ($emailSession->getSession() === $this) {
$emailSession->setSession(null);
}
}
return $this;
}
/**
* @return Collection<int, EmailStudent>
*/
public function getEmailStudents(): Collection
{
return $this->emailStudents;
}
public function addEmailStudent(EmailStudent $emailStudent): self
{
if (!$this->emailStudents->contains($emailStudent)) {
$this->emailStudents->add($emailStudent);
$emailStudent->setSession($this);
}
return $this;
}
public function removeEmailStudent(EmailStudent $emailStudent): self
{
if ($this->emailStudents->removeElement($emailStudent)) {
// set the owning side to null (unless already changed)
if ($emailStudent->getSession() === $this) {
$emailStudent->setSession(null);
}
}
return $this;
}
public function getLiengithub(): ?string
{
return $this->liengithub;
}
public function setLiengithub(?string $liengithub): self
{
$this->liengithub = $liengithub;
return $this;
}
public function getLienprog(): ?string
{
return $this->lienprog;
}
public function setLienprog(?string $lienprog): self
{
$this->lienprog = $lienprog;
return $this;
}
public function getDiscord(): ?string
{
return $this->discord;
}
public function setDiscord(?string $discord): self
{
$this->discord = $discord;
return $this;
}
/**
* @return Collection<int, NotificationSession>
*/
public function getNotificationSessions(): Collection
{
return $this->notificationSessions;
}
public function addNotificationSession(NotificationSession $notificationSession): self
{
if (!$this->notificationSessions->contains($notificationSession)) {
$this->notificationSessions->add($notificationSession);
$notificationSession->setSession($this);
}
return $this;
}
public function removeNotificationSession(NotificationSession $notificationSession): self
{
if ($this->notificationSessions->removeElement($notificationSession)) {
// set the owning side to null (unless already changed)
if ($notificationSession->getSession() === $this) {
$notificationSession->setSession(null);
}
}
return $this;
}
/**
* @return Collection<int, LotCoupon>
*/
public function getLotCoupons(): Collection
{
return $this->lotCoupons;
}
public function addLotCoupon(LotCoupon $lotCoupon): self
{
if (!$this->lotCoupons->contains($lotCoupon)) {
$this->lotCoupons->add($lotCoupon);
$lotCoupon->setEvenement($this);
}
return $this;
}
public function removeLotCoupon(LotCoupon $lotCoupon): self
{
if ($this->lotCoupons->removeElement($lotCoupon)) {
// set the owning side to null (unless already changed)
if ($lotCoupon->getEvenement() === $this) {
$lotCoupon->setEvenement(null);
}
}
return $this;
}
}