src/Entity/Evenement.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Core\Annotation\ApiResource;
  4. use App\Repository\EvenementRepository;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\DBAL\Types\Types;
  8. use Doctrine\ORM\Mapping as ORM;
  9. #[ORM\Entity(repositoryClassEvenementRepository::class)]
  10. #[ApiResource]
  11. class Evenement
  12. {
  13.     #[ORM\Id]
  14.     #[ORM\GeneratedValue]
  15.     #[ORM\Column]
  16.     private ?int $id null;
  17.     #[ORM\Column(length255nullabletrue)]
  18.     private ?string $image null;
  19.     #[ORM\Column(length255nullabletrue)]
  20.     private ?string $titre null;
  21.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  22.     private ?string $descriptionshort null;
  23.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  24.     private ?string $description null;
  25.     #[ORM\Column(length255nullabletrue)]
  26.     private ?string $adresse null;
  27.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  28.     private ?\DateTimeInterface $starttime null;
  29.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  30.     private ?\DateTimeInterface $endtime null;
  31.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  32.     private ?\DateTimeInterface $date null;
  33.     #[ORM\Column(length255nullabletrue)]
  34.     private ?string $imgdetail null;
  35.     #[ORM\Column(length255nullabletrue)]
  36.     private ?string $mode null;
  37.     #[ORM\Column(length255nullabletrue)]
  38.     private ?string $slug null;
  39.     #[ORM\OneToMany(mappedBy'session'targetEntityInscritSession::class,cascade: ['remove'])]
  40.     private Collection $inscritSessions;
  41.     #[ORM\ManyToOne(inversedBy'evenements')]
  42.     private ?Formation $formation null;
  43.     #[ORM\OneToMany(mappedBy'session'targetEntityReglement::class,cascade: ['remove'])]
  44.     private Collection $reglements;
  45.     #[ORM\ManyToOne(inversedBy'evenements')]
  46.     private ?User $formateur null;
  47.     #[ORM\Column(length255nullabletrue)]
  48.     private ?string $liendrive null;
  49.     #[ORM\OneToMany(mappedBy'session'targetEntityVirtualClassroom::class,cascade: ['remove'])]
  50.     private Collection $virtualClassrooms;
  51.     #[ORM\OneToMany(mappedBy'session'targetEntityReclamation::class,cascade: ['remove'])]
  52.     private Collection $reclamations;
  53.     #[ORM\OneToMany(mappedBy'evenement'targetEntityEvaluation::class,cascade: ['remove'])]
  54.     private Collection $eval;
  55.     #[ORM\Column(length255nullabletrue)]
  56.     private ?string $type null;
  57.     #[ORM\Column(length255nullabletrue)]
  58.     private ?string $prixpromo null;
  59.     #[ORM\OneToMany(mappedBy'utilisationsession'targetEntityUtilisation::class,cascade: ['remove'])]
  60.     private Collection $utilisations;
  61.     #[ORM\Column(length255nullabletrue)]
  62.     private ?string $certeficatvierge null;
  63.     #[ORM\OneToMany(mappedBy'session'targetEntityTrace::class,cascade: ['remove'])]
  64.     private Collection $traces;
  65.     #[ORM\Column(nullabletrue)]
  66.     private ?bool $isArchive null;
  67.     #[ORM\Column(length255nullabletrue)]
  68.     private ?string $imgprog null;
  69.     #[ORM\OneToMany(mappedBy'session'targetEntityEmailSession::class,cascade: ['remove'])]
  70.     private Collection $emailSessions;
  71.     #[ORM\OneToMany(mappedBy'session'targetEntityEmailStudent::class,cascade: ['remove'])]
  72.     private Collection $emailStudents;
  73.     #[ORM\Column(length255nullabletrue)]
  74.     private ?string $liengithub null;
  75.     #[ORM\Column(length255nullabletrue)]
  76.     private ?string $lienprog null;
  77.     #[ORM\Column(length255nullabletrue)]
  78.     private ?string $discord null;
  79.     #[ORM\OneToMany(mappedBy'session'targetEntityNotificationSession::class)]
  80.     private Collection $notificationSessions;
  81.     #[ORM\OneToMany(mappedBy'evenement'targetEntityLotCoupon::class)]
  82.     private Collection $lotCoupons;
  83.     #[ORM\OneToMany(mappedBy'session'targetEntityQuizAssignment::class)]
  84.     private Collection $assignments;
  85.     #[ORM\OneToMany(mappedBy'session'targetEntityChatSession::class)]
  86.     private Collection $chatSessions;
  87.     public function __construct()
  88.     {
  89.         $this->inscritSessions = new ArrayCollection();
  90.         $this->reglements = new ArrayCollection();
  91.         $this->virtualClassrooms = new ArrayCollection();
  92.         $this->reclamations = new ArrayCollection();
  93.         $this->eval = new ArrayCollection();
  94.         $this->utilisations = new ArrayCollection();
  95.         $this->traces = new ArrayCollection();
  96.         $this->emailSessions = new ArrayCollection();
  97.         $this->emailStudents = new ArrayCollection();
  98.         $this->notificationSessions = new ArrayCollection();
  99.         $this->lotCoupons = new ArrayCollection();
  100.         $this->assignments = new ArrayCollection();
  101.         $this->chatSessions = new ArrayCollection();
  102.     }
  103.     public function getId(): ?int
  104.     {
  105.         return $this->id;
  106.     }
  107.     public function getImage(): ?string
  108.     {
  109.         return $this->image;
  110.     }
  111.     public function setImage(?string $image): self
  112.     {
  113.         $this->image $image;
  114.         return $this;
  115.     }
  116.     public function getTitre(): ?string
  117.     {
  118.         return $this->titre;
  119.     }
  120.     public function setTitre(?string $titre): self
  121.     {
  122.         $this->titre $titre;
  123.         return $this;
  124.     }
  125.     public function getDescriptionshort(): ?string
  126.     {
  127.         return $this->descriptionshort;
  128.     }
  129.     public function setDescriptionshort(?string $descriptionshort): self
  130.     {
  131.         $this->descriptionshort $descriptionshort;
  132.         return $this;
  133.     }
  134.     public function getDescription(): ?string
  135.     {
  136.         return $this->description;
  137.     }
  138.     public function setDescription(?string $description): self
  139.     {
  140.         $this->description $description;
  141.         return $this;
  142.     }
  143.     public function getAdresse(): ?string
  144.     {
  145.         return $this->adresse;
  146.     }
  147.     public function setAdresse(?string $adresse): self
  148.     {
  149.         $this->adresse $adresse;
  150.         return $this;
  151.     }
  152.     public function getStarttime(): ?\DateTimeInterface
  153.     {
  154.         return $this->starttime;
  155.     }
  156.     public function setStarttime(?\DateTimeInterface $starttime): self
  157.     {
  158.         $this->starttime $starttime;
  159.         return $this;
  160.     }
  161.     public function getEndtime(): ?\DateTimeInterface
  162.     {
  163.         return $this->endtime;
  164.     }
  165.     public function setEndtime(?\DateTimeInterface $endtime): self
  166.     {
  167.         $this->endtime $endtime;
  168.         return $this;
  169.     }
  170.     public function getDate(): ?\DateTimeInterface
  171.     {
  172.         return $this->date;
  173.     }
  174.     public function setDate(?\DateTimeInterface $date): self
  175.     {
  176.         $this->date $date;
  177.         return $this;
  178.     }
  179.     public function getImgdetail(): ?string
  180.     {
  181.         return $this->imgdetail;
  182.     }
  183.     public function setImgdetail(?string $imgdetail): self
  184.     {
  185.         $this->imgdetail $imgdetail;
  186.         return $this;
  187.     }
  188.     public function getMode(): ?string
  189.     {
  190.         return $this->mode;
  191.     }
  192.     public function setMode(?string $mode): self
  193.     {
  194.         $this->mode $mode;
  195.         return $this;
  196.     }
  197.     public function getSlug(): ?string
  198.     {
  199.         return $this->slug;
  200.     }
  201.     public function setSlug(?string $slug): self
  202.     {
  203.         $this->slug $slug;
  204.         return $this;
  205.     }
  206.     /**
  207.      * @return Collection<int, InscritSession>
  208.      */
  209.     public function getInscritSessions(): Collection
  210.     {
  211.         return $this->inscritSessions;
  212.     }
  213.     public function addInscritSession(InscritSession $inscritSession): self
  214.     {
  215.         if (!$this->inscritSessions->contains($inscritSession)) {
  216.             $this->inscritSessions->add($inscritSession);
  217.             $inscritSession->setSession($this);
  218.         }
  219.         return $this;
  220.     }
  221.     public function removeInscritSession(InscritSession $inscritSession): self
  222.     {
  223.         if ($this->inscritSessions->removeElement($inscritSession)) {
  224.             // set the owning side to null (unless already changed)
  225.             if ($inscritSession->getSession() === $this) {
  226.                 $inscritSession->setSession(null);
  227.             }
  228.         }
  229.         return $this;
  230.     }
  231.     public function getFormation(): ?Formation
  232.     {
  233.         return $this->formation;
  234.     }
  235.     public function setFormation(?Formation $formation): self
  236.     {
  237.         $this->formation $formation;
  238.         return $this;
  239.     }
  240.     /**
  241.      * @return Collection<int, Reglement>
  242.      */
  243.     public function getReglements(): Collection
  244.     {
  245.         return $this->reglements;
  246.     }
  247.     public function addReglement(Reglement $reglement): self
  248.     {
  249.         if (!$this->reglements->contains($reglement)) {
  250.             $this->reglements->add($reglement);
  251.             $reglement->setSession($this);
  252.         }
  253.         return $this;
  254.     }
  255.     public function removeReglement(Reglement $reglement): self
  256.     {
  257.         if ($this->reglements->removeElement($reglement)) {
  258.             // set the owning side to null (unless already changed)
  259.             if ($reglement->getSession() === $this) {
  260.                 $reglement->setSession(null);
  261.             }
  262.         }
  263.         return $this;
  264.     }
  265.     public function getFormateur(): ?User
  266.     {
  267.         return $this->formateur;
  268.     }
  269.     public function setFormateur(?User $formateur): self
  270.     {
  271.         $this->formateur $formateur;
  272.         return $this;
  273.     }
  274.     public function getLiendrive(): ?string
  275.     {
  276.         return $this->liendrive;
  277.     }
  278.     public function setLiendrive(?string $liendrive): self
  279.     {
  280.         $this->liendrive $liendrive;
  281.         return $this;
  282.     }
  283.     /**
  284.      * @return Collection<int, VirtualClassroom>
  285.      */
  286.     public function getVirtualClassrooms(): Collection
  287.     {
  288.         return $this->virtualClassrooms;
  289.     }
  290.     public function addVirtualClassroom(VirtualClassroom $virtualClassroom): self
  291.     {
  292.         if (!$this->virtualClassrooms->contains($virtualClassroom)) {
  293.             $this->virtualClassrooms->add($virtualClassroom);
  294.             $virtualClassroom->setSession($this);
  295.         }
  296.         return $this;
  297.     }
  298.     public function removeVirtualClassroom(VirtualClassroom $virtualClassroom): self
  299.     {
  300.         if ($this->virtualClassrooms->removeElement($virtualClassroom)) {
  301.             // set the owning side to null (unless already changed)
  302.             if ($virtualClassroom->getSession() === $this) {
  303.                 $virtualClassroom->setSession(null);
  304.             }
  305.         }
  306.         return $this;
  307.     }
  308.     /**
  309.      * @return Collection<int, Reclamation>
  310.      */
  311.     public function getReclamations(): Collection
  312.     {
  313.         return $this->reclamations;
  314.     }
  315.     public function addReclamation(Reclamation $reclamation): self
  316.     {
  317.         if (!$this->reclamations->contains($reclamation)) {
  318.             $this->reclamations->add($reclamation);
  319.             $reclamation->setSession($this);
  320.         }
  321.         return $this;
  322.     }
  323.     public function removeReclamation(Reclamation $reclamation): self
  324.     {
  325.         if ($this->reclamations->removeElement($reclamation)) {
  326.             // set the owning side to null (unless already changed)
  327.             if ($reclamation->getSession() === $this) {
  328.                 $reclamation->setSession(null);
  329.             }
  330.         }
  331.         return $this;
  332.     }
  333.     /**
  334.      * @return Collection<int, Evaluation>
  335.      */
  336.     public function getEval(): Collection
  337.     {
  338.         return $this->eval;
  339.     }
  340.     public function addEval(Evaluation $eval): self
  341.     {
  342.         if (!$this->eval->contains($eval)) {
  343.             $this->eval->add($eval);
  344.             $eval->setEvenement($this);
  345.         }
  346.         return $this;
  347.     }
  348.     public function removeEval(Evaluation $eval): self
  349.     {
  350.         if ($this->eval->removeElement($eval)) {
  351.             // set the owning side to null (unless already changed)
  352.             if ($eval->getEvenement() === $this) {
  353.                 $eval->setEvenement(null);
  354.             }
  355.         }
  356.         return $this;
  357.     }
  358.     public function __toString(): string
  359.     {
  360.         return $this->titre;
  361.     }
  362.     public function getType(): ?string
  363.     {
  364.         return $this->type;
  365.     }
  366.     public function setType(?string $type): self
  367.     {
  368.         $this->type $type;
  369.         return $this;
  370.     }
  371.     public function getPrixpromo(): ?string
  372.     {
  373.         return $this->prixpromo;
  374.     }
  375.     public function setPrixpromo(?string $prixpromo): self
  376.     {
  377.         $this->prixpromo $prixpromo;
  378.         return $this;
  379.     }
  380.     /**
  381.      * @return Collection<int, Utilisation>
  382.      */
  383.     public function getUtilisations(): Collection
  384.     {
  385.         return $this->utilisations;
  386.     }
  387.     public function addUtilisation(Utilisation $utilisation): self
  388.     {
  389.         if (!$this->utilisations->contains($utilisation)) {
  390.             $this->utilisations->add($utilisation);
  391.             $utilisation->setUtilisationsession($this);
  392.         }
  393.         return $this;
  394.     }
  395.     public function removeUtilisation(Utilisation $utilisation): self
  396.     {
  397.         if ($this->utilisations->removeElement($utilisation)) {
  398.             // set the owning side to null (unless already changed)
  399.             if ($utilisation->getUtilisationsession() === $this) {
  400.                 $utilisation->setUtilisationsession(null);
  401.             }
  402.         }
  403.         return $this;
  404.     }
  405.     public function getCerteficatvierge(): ?string
  406.     {
  407.         return $this->certeficatvierge;
  408.     }
  409.     public function setCerteficatvierge(?string $certeficatvierge): self
  410.     {
  411.         $this->certeficatvierge $certeficatvierge;
  412.         return $this;
  413.     }
  414.     /**
  415.      * @return Collection<int, Trace>
  416.      */
  417.     public function getTraces(): Collection
  418.     {
  419.         return $this->traces;
  420.     }
  421.     public function addTrace(Trace $trace): self
  422.     {
  423.         if (!$this->traces->contains($trace)) {
  424.             $this->traces->add($trace);
  425.             $trace->setSession($this);
  426.         }
  427.         return $this;
  428.     }
  429.     public function removeTrace(Trace $trace): self
  430.     {
  431.         if ($this->traces->removeElement($trace)) {
  432.             // set the owning side to null (unless already changed)
  433.             if ($trace->getSession() === $this) {
  434.                 $trace->setSession(null);
  435.             }
  436.         }
  437.         return $this;
  438.     }
  439.     public function isIsArchive(): ?bool
  440.     {
  441.         return $this->isArchive;
  442.     }
  443.     public function setIsArchive(?bool $isArchive): self
  444.     {
  445.         $this->isArchive $isArchive;
  446.         return $this;
  447.     }
  448.     public function getImgprog(): ?string
  449.     {
  450.         return $this->imgprog;
  451.     }
  452.     public function setImgprog(?string $imgprog): self
  453.     {
  454.         $this->imgprog $imgprog;
  455.         return $this;
  456.     }
  457.     /**
  458.      * @return Collection<int, EmailSession>
  459.      */
  460.     public function getEmailSessions(): Collection
  461.     {
  462.         return $this->emailSessions;
  463.     }
  464.     public function addEmailSession(EmailSession $emailSession): self
  465.     {
  466.         if (!$this->emailSessions->contains($emailSession)) {
  467.             $this->emailSessions->add($emailSession);
  468.             $emailSession->setSession($this);
  469.         }
  470.         return $this;
  471.     }
  472.     public function removeEmailSession(EmailSession $emailSession): self
  473.     {
  474.         if ($this->emailSessions->removeElement($emailSession)) {
  475.             // set the owning side to null (unless already changed)
  476.             if ($emailSession->getSession() === $this) {
  477.                 $emailSession->setSession(null);
  478.             }
  479.         }
  480.         return $this;
  481.     }
  482.     /**
  483.      * @return Collection<int, EmailStudent>
  484.      */
  485.     public function getEmailStudents(): Collection
  486.     {
  487.         return $this->emailStudents;
  488.     }
  489.     public function addEmailStudent(EmailStudent $emailStudent): self
  490.     {
  491.         if (!$this->emailStudents->contains($emailStudent)) {
  492.             $this->emailStudents->add($emailStudent);
  493.             $emailStudent->setSession($this);
  494.         }
  495.         return $this;
  496.     }
  497.     public function removeEmailStudent(EmailStudent $emailStudent): self
  498.     {
  499.         if ($this->emailStudents->removeElement($emailStudent)) {
  500.             // set the owning side to null (unless already changed)
  501.             if ($emailStudent->getSession() === $this) {
  502.                 $emailStudent->setSession(null);
  503.             }
  504.         }
  505.         return $this;
  506.     }
  507.     public function getLiengithub(): ?string
  508.     {
  509.         return $this->liengithub;
  510.     }
  511.     public function setLiengithub(?string $liengithub): self
  512.     {
  513.         $this->liengithub $liengithub;
  514.         return $this;
  515.     }
  516.     public function getLienprog(): ?string
  517.     {
  518.         return $this->lienprog;
  519.     }
  520.     public function setLienprog(?string $lienprog): self
  521.     {
  522.         $this->lienprog $lienprog;
  523.         return $this;
  524.     }
  525.     public function getDiscord(): ?string
  526.     {
  527.         return $this->discord;
  528.     }
  529.     public function setDiscord(?string $discord): self
  530.     {
  531.         $this->discord $discord;
  532.         return $this;
  533.     }
  534.     /**
  535.      * @return Collection<int, NotificationSession>
  536.      */
  537.     public function getNotificationSessions(): Collection
  538.     {
  539.         return $this->notificationSessions;
  540.     }
  541.     public function addNotificationSession(NotificationSession $notificationSession): self
  542.     {
  543.         if (!$this->notificationSessions->contains($notificationSession)) {
  544.             $this->notificationSessions->add($notificationSession);
  545.             $notificationSession->setSession($this);
  546.         }
  547.         return $this;
  548.     }
  549.     public function removeNotificationSession(NotificationSession $notificationSession): self
  550.     {
  551.         if ($this->notificationSessions->removeElement($notificationSession)) {
  552.             // set the owning side to null (unless already changed)
  553.             if ($notificationSession->getSession() === $this) {
  554.                 $notificationSession->setSession(null);
  555.             }
  556.         }
  557.         return $this;
  558.     }
  559.     /**
  560.      * @return Collection<int, LotCoupon>
  561.      */
  562.     public function getLotCoupons(): Collection
  563.     {
  564.         return $this->lotCoupons;
  565.     }
  566.     public function addLotCoupon(LotCoupon $lotCoupon): self
  567.     {
  568.         if (!$this->lotCoupons->contains($lotCoupon)) {
  569.             $this->lotCoupons->add($lotCoupon);
  570.             $lotCoupon->setEvenement($this);
  571.         }
  572.         return $this;
  573.     }
  574.     public function removeLotCoupon(LotCoupon $lotCoupon): self
  575.     {
  576.         if ($this->lotCoupons->removeElement($lotCoupon)) {
  577.             // set the owning side to null (unless already changed)
  578.             if ($lotCoupon->getEvenement() === $this) {
  579.                 $lotCoupon->setEvenement(null);
  580.             }
  581.         }
  582.         return $this;
  583.     }
  584.     /**
  585.      * @return Collection<int, QuizAssignment>
  586.      */
  587.     public function getAssignments(): Collection
  588.     {
  589.         return $this->assignments;
  590.     }
  591.     public function addAssignment(QuizAssignment $assignment): self
  592.     {
  593.         if (!$this->assignments->contains($assignment)) {
  594.             $this->assignments->add($assignment);
  595.             $assignment->setSession($this);
  596.         }
  597.         return $this;
  598.     }
  599.     public function removeAssignment(QuizAssignment $assignment): self
  600.     {
  601.         if ($this->assignments->removeElement($assignment)) {
  602.             // set the owning side to null (unless already changed)
  603.             if ($assignment->getSession() === $this) {
  604.                 $assignment->setSession(null);
  605.             }
  606.         }
  607.         return $this;
  608.     }
  609.     /**
  610.      * @return Collection<int, ChatSession>
  611.      */
  612.     public function getChatSessions(): Collection
  613.     {
  614.         return $this->chatSessions;
  615.     }
  616.     public function addChatSession(ChatSession $chatSession): self
  617.     {
  618.         if (!$this->chatSessions->contains($chatSession)) {
  619.             $this->chatSessions->add($chatSession);
  620.             $chatSession->setSession($this);
  621.         }
  622.         return $this;
  623.     }
  624.     public function removeChatSession(ChatSession $chatSession): self
  625.     {
  626.         if ($this->chatSessions->removeElement($chatSession)) {
  627.             // set the owning side to null (unless already changed)
  628.             if ($chatSession->getSession() === $this) {
  629.                 $chatSession->setSession(null);
  630.             }
  631.         }
  632.         return $this;
  633.     }
  634. }