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.     public function __construct()
  84.     {
  85.         $this->inscritSessions = new ArrayCollection();
  86.         $this->reglements = new ArrayCollection();
  87.         $this->virtualClassrooms = new ArrayCollection();
  88.         $this->reclamations = new ArrayCollection();
  89.         $this->eval = new ArrayCollection();
  90.         $this->utilisations = new ArrayCollection();
  91.         $this->traces = new ArrayCollection();
  92.         $this->emailSessions = new ArrayCollection();
  93.         $this->emailStudents = new ArrayCollection();
  94.         $this->notificationSessions = new ArrayCollection();
  95.         $this->lotCoupons = new ArrayCollection();
  96.     }
  97.     public function getId(): ?int
  98.     {
  99.         return $this->id;
  100.     }
  101.     public function getImage(): ?string
  102.     {
  103.         return $this->image;
  104.     }
  105.     public function setImage(?string $image): self
  106.     {
  107.         $this->image $image;
  108.         return $this;
  109.     }
  110.     public function getTitre(): ?string
  111.     {
  112.         return $this->titre;
  113.     }
  114.     public function setTitre(?string $titre): self
  115.     {
  116.         $this->titre $titre;
  117.         return $this;
  118.     }
  119.     public function getDescriptionshort(): ?string
  120.     {
  121.         return $this->descriptionshort;
  122.     }
  123.     public function setDescriptionshort(?string $descriptionshort): self
  124.     {
  125.         $this->descriptionshort $descriptionshort;
  126.         return $this;
  127.     }
  128.     public function getDescription(): ?string
  129.     {
  130.         return $this->description;
  131.     }
  132.     public function setDescription(?string $description): self
  133.     {
  134.         $this->description $description;
  135.         return $this;
  136.     }
  137.     public function getAdresse(): ?string
  138.     {
  139.         return $this->adresse;
  140.     }
  141.     public function setAdresse(?string $adresse): self
  142.     {
  143.         $this->adresse $adresse;
  144.         return $this;
  145.     }
  146.     public function getStarttime(): ?\DateTimeInterface
  147.     {
  148.         return $this->starttime;
  149.     }
  150.     public function setStarttime(?\DateTimeInterface $starttime): self
  151.     {
  152.         $this->starttime $starttime;
  153.         return $this;
  154.     }
  155.     public function getEndtime(): ?\DateTimeInterface
  156.     {
  157.         return $this->endtime;
  158.     }
  159.     public function setEndtime(?\DateTimeInterface $endtime): self
  160.     {
  161.         $this->endtime $endtime;
  162.         return $this;
  163.     }
  164.     public function getDate(): ?\DateTimeInterface
  165.     {
  166.         return $this->date;
  167.     }
  168.     public function setDate(?\DateTimeInterface $date): self
  169.     {
  170.         $this->date $date;
  171.         return $this;
  172.     }
  173.     public function getImgdetail(): ?string
  174.     {
  175.         return $this->imgdetail;
  176.     }
  177.     public function setImgdetail(?string $imgdetail): self
  178.     {
  179.         $this->imgdetail $imgdetail;
  180.         return $this;
  181.     }
  182.     public function getMode(): ?string
  183.     {
  184.         return $this->mode;
  185.     }
  186.     public function setMode(?string $mode): self
  187.     {
  188.         $this->mode $mode;
  189.         return $this;
  190.     }
  191.     public function getSlug(): ?string
  192.     {
  193.         return $this->slug;
  194.     }
  195.     public function setSlug(?string $slug): self
  196.     {
  197.         $this->slug $slug;
  198.         return $this;
  199.     }
  200.     /**
  201.      * @return Collection<int, InscritSession>
  202.      */
  203.     public function getInscritSessions(): Collection
  204.     {
  205.         return $this->inscritSessions;
  206.     }
  207.     public function addInscritSession(InscritSession $inscritSession): self
  208.     {
  209.         if (!$this->inscritSessions->contains($inscritSession)) {
  210.             $this->inscritSessions->add($inscritSession);
  211.             $inscritSession->setSession($this);
  212.         }
  213.         return $this;
  214.     }
  215.     public function removeInscritSession(InscritSession $inscritSession): self
  216.     {
  217.         if ($this->inscritSessions->removeElement($inscritSession)) {
  218.             // set the owning side to null (unless already changed)
  219.             if ($inscritSession->getSession() === $this) {
  220.                 $inscritSession->setSession(null);
  221.             }
  222.         }
  223.         return $this;
  224.     }
  225.     public function getFormation(): ?Formation
  226.     {
  227.         return $this->formation;
  228.     }
  229.     public function setFormation(?Formation $formation): self
  230.     {
  231.         $this->formation $formation;
  232.         return $this;
  233.     }
  234.     /**
  235.      * @return Collection<int, Reglement>
  236.      */
  237.     public function getReglements(): Collection
  238.     {
  239.         return $this->reglements;
  240.     }
  241.     public function addReglement(Reglement $reglement): self
  242.     {
  243.         if (!$this->reglements->contains($reglement)) {
  244.             $this->reglements->add($reglement);
  245.             $reglement->setSession($this);
  246.         }
  247.         return $this;
  248.     }
  249.     public function removeReglement(Reglement $reglement): self
  250.     {
  251.         if ($this->reglements->removeElement($reglement)) {
  252.             // set the owning side to null (unless already changed)
  253.             if ($reglement->getSession() === $this) {
  254.                 $reglement->setSession(null);
  255.             }
  256.         }
  257.         return $this;
  258.     }
  259.     public function getFormateur(): ?User
  260.     {
  261.         return $this->formateur;
  262.     }
  263.     public function setFormateur(?User $formateur): self
  264.     {
  265.         $this->formateur $formateur;
  266.         return $this;
  267.     }
  268.     public function getLiendrive(): ?string
  269.     {
  270.         return $this->liendrive;
  271.     }
  272.     public function setLiendrive(?string $liendrive): self
  273.     {
  274.         $this->liendrive $liendrive;
  275.         return $this;
  276.     }
  277.     /**
  278.      * @return Collection<int, VirtualClassroom>
  279.      */
  280.     public function getVirtualClassrooms(): Collection
  281.     {
  282.         return $this->virtualClassrooms;
  283.     }
  284.     public function addVirtualClassroom(VirtualClassroom $virtualClassroom): self
  285.     {
  286.         if (!$this->virtualClassrooms->contains($virtualClassroom)) {
  287.             $this->virtualClassrooms->add($virtualClassroom);
  288.             $virtualClassroom->setSession($this);
  289.         }
  290.         return $this;
  291.     }
  292.     public function removeVirtualClassroom(VirtualClassroom $virtualClassroom): self
  293.     {
  294.         if ($this->virtualClassrooms->removeElement($virtualClassroom)) {
  295.             // set the owning side to null (unless already changed)
  296.             if ($virtualClassroom->getSession() === $this) {
  297.                 $virtualClassroom->setSession(null);
  298.             }
  299.         }
  300.         return $this;
  301.     }
  302.     /**
  303.      * @return Collection<int, Reclamation>
  304.      */
  305.     public function getReclamations(): Collection
  306.     {
  307.         return $this->reclamations;
  308.     }
  309.     public function addReclamation(Reclamation $reclamation): self
  310.     {
  311.         if (!$this->reclamations->contains($reclamation)) {
  312.             $this->reclamations->add($reclamation);
  313.             $reclamation->setSession($this);
  314.         }
  315.         return $this;
  316.     }
  317.     public function removeReclamation(Reclamation $reclamation): self
  318.     {
  319.         if ($this->reclamations->removeElement($reclamation)) {
  320.             // set the owning side to null (unless already changed)
  321.             if ($reclamation->getSession() === $this) {
  322.                 $reclamation->setSession(null);
  323.             }
  324.         }
  325.         return $this;
  326.     }
  327.     /**
  328.      * @return Collection<int, Evaluation>
  329.      */
  330.     public function getEval(): Collection
  331.     {
  332.         return $this->eval;
  333.     }
  334.     public function addEval(Evaluation $eval): self
  335.     {
  336.         if (!$this->eval->contains($eval)) {
  337.             $this->eval->add($eval);
  338.             $eval->setEvenement($this);
  339.         }
  340.         return $this;
  341.     }
  342.     public function removeEval(Evaluation $eval): self
  343.     {
  344.         if ($this->eval->removeElement($eval)) {
  345.             // set the owning side to null (unless already changed)
  346.             if ($eval->getEvenement() === $this) {
  347.                 $eval->setEvenement(null);
  348.             }
  349.         }
  350.         return $this;
  351.     }
  352.     public function __toString(): string
  353.     {
  354.         return $this->titre;
  355.     }
  356.     public function getType(): ?string
  357.     {
  358.         return $this->type;
  359.     }
  360.     public function setType(?string $type): self
  361.     {
  362.         $this->type $type;
  363.         return $this;
  364.     }
  365.     public function getPrixpromo(): ?string
  366.     {
  367.         return $this->prixpromo;
  368.     }
  369.     public function setPrixpromo(?string $prixpromo): self
  370.     {
  371.         $this->prixpromo $prixpromo;
  372.         return $this;
  373.     }
  374.     /**
  375.      * @return Collection<int, Utilisation>
  376.      */
  377.     public function getUtilisations(): Collection
  378.     {
  379.         return $this->utilisations;
  380.     }
  381.     public function addUtilisation(Utilisation $utilisation): self
  382.     {
  383.         if (!$this->utilisations->contains($utilisation)) {
  384.             $this->utilisations->add($utilisation);
  385.             $utilisation->setUtilisationsession($this);
  386.         }
  387.         return $this;
  388.     }
  389.     public function removeUtilisation(Utilisation $utilisation): self
  390.     {
  391.         if ($this->utilisations->removeElement($utilisation)) {
  392.             // set the owning side to null (unless already changed)
  393.             if ($utilisation->getUtilisationsession() === $this) {
  394.                 $utilisation->setUtilisationsession(null);
  395.             }
  396.         }
  397.         return $this;
  398.     }
  399.     public function getCerteficatvierge(): ?string
  400.     {
  401.         return $this->certeficatvierge;
  402.     }
  403.     public function setCerteficatvierge(?string $certeficatvierge): self
  404.     {
  405.         $this->certeficatvierge $certeficatvierge;
  406.         return $this;
  407.     }
  408.     /**
  409.      * @return Collection<int, Trace>
  410.      */
  411.     public function getTraces(): Collection
  412.     {
  413.         return $this->traces;
  414.     }
  415.     public function addTrace(Trace $trace): self
  416.     {
  417.         if (!$this->traces->contains($trace)) {
  418.             $this->traces->add($trace);
  419.             $trace->setSession($this);
  420.         }
  421.         return $this;
  422.     }
  423.     public function removeTrace(Trace $trace): self
  424.     {
  425.         if ($this->traces->removeElement($trace)) {
  426.             // set the owning side to null (unless already changed)
  427.             if ($trace->getSession() === $this) {
  428.                 $trace->setSession(null);
  429.             }
  430.         }
  431.         return $this;
  432.     }
  433.     public function isIsArchive(): ?bool
  434.     {
  435.         return $this->isArchive;
  436.     }
  437.     public function setIsArchive(?bool $isArchive): self
  438.     {
  439.         $this->isArchive $isArchive;
  440.         return $this;
  441.     }
  442.     public function getImgprog(): ?string
  443.     {
  444.         return $this->imgprog;
  445.     }
  446.     public function setImgprog(?string $imgprog): self
  447.     {
  448.         $this->imgprog $imgprog;
  449.         return $this;
  450.     }
  451.     /**
  452.      * @return Collection<int, EmailSession>
  453.      */
  454.     public function getEmailSessions(): Collection
  455.     {
  456.         return $this->emailSessions;
  457.     }
  458.     public function addEmailSession(EmailSession $emailSession): self
  459.     {
  460.         if (!$this->emailSessions->contains($emailSession)) {
  461.             $this->emailSessions->add($emailSession);
  462.             $emailSession->setSession($this);
  463.         }
  464.         return $this;
  465.     }
  466.     public function removeEmailSession(EmailSession $emailSession): self
  467.     {
  468.         if ($this->emailSessions->removeElement($emailSession)) {
  469.             // set the owning side to null (unless already changed)
  470.             if ($emailSession->getSession() === $this) {
  471.                 $emailSession->setSession(null);
  472.             }
  473.         }
  474.         return $this;
  475.     }
  476.     /**
  477.      * @return Collection<int, EmailStudent>
  478.      */
  479.     public function getEmailStudents(): Collection
  480.     {
  481.         return $this->emailStudents;
  482.     }
  483.     public function addEmailStudent(EmailStudent $emailStudent): self
  484.     {
  485.         if (!$this->emailStudents->contains($emailStudent)) {
  486.             $this->emailStudents->add($emailStudent);
  487.             $emailStudent->setSession($this);
  488.         }
  489.         return $this;
  490.     }
  491.     public function removeEmailStudent(EmailStudent $emailStudent): self
  492.     {
  493.         if ($this->emailStudents->removeElement($emailStudent)) {
  494.             // set the owning side to null (unless already changed)
  495.             if ($emailStudent->getSession() === $this) {
  496.                 $emailStudent->setSession(null);
  497.             }
  498.         }
  499.         return $this;
  500.     }
  501.     public function getLiengithub(): ?string
  502.     {
  503.         return $this->liengithub;
  504.     }
  505.     public function setLiengithub(?string $liengithub): self
  506.     {
  507.         $this->liengithub $liengithub;
  508.         return $this;
  509.     }
  510.     public function getLienprog(): ?string
  511.     {
  512.         return $this->lienprog;
  513.     }
  514.     public function setLienprog(?string $lienprog): self
  515.     {
  516.         $this->lienprog $lienprog;
  517.         return $this;
  518.     }
  519.     public function getDiscord(): ?string
  520.     {
  521.         return $this->discord;
  522.     }
  523.     public function setDiscord(?string $discord): self
  524.     {
  525.         $this->discord $discord;
  526.         return $this;
  527.     }
  528.     /**
  529.      * @return Collection<int, NotificationSession>
  530.      */
  531.     public function getNotificationSessions(): Collection
  532.     {
  533.         return $this->notificationSessions;
  534.     }
  535.     public function addNotificationSession(NotificationSession $notificationSession): self
  536.     {
  537.         if (!$this->notificationSessions->contains($notificationSession)) {
  538.             $this->notificationSessions->add($notificationSession);
  539.             $notificationSession->setSession($this);
  540.         }
  541.         return $this;
  542.     }
  543.     public function removeNotificationSession(NotificationSession $notificationSession): self
  544.     {
  545.         if ($this->notificationSessions->removeElement($notificationSession)) {
  546.             // set the owning side to null (unless already changed)
  547.             if ($notificationSession->getSession() === $this) {
  548.                 $notificationSession->setSession(null);
  549.             }
  550.         }
  551.         return $this;
  552.     }
  553.     /**
  554.      * @return Collection<int, LotCoupon>
  555.      */
  556.     public function getLotCoupons(): Collection
  557.     {
  558.         return $this->lotCoupons;
  559.     }
  560.     public function addLotCoupon(LotCoupon $lotCoupon): self
  561.     {
  562.         if (!$this->lotCoupons->contains($lotCoupon)) {
  563.             $this->lotCoupons->add($lotCoupon);
  564.             $lotCoupon->setEvenement($this);
  565.         }
  566.         return $this;
  567.     }
  568.     public function removeLotCoupon(LotCoupon $lotCoupon): self
  569.     {
  570.         if ($this->lotCoupons->removeElement($lotCoupon)) {
  571.             // set the owning side to null (unless already changed)
  572.             if ($lotCoupon->getEvenement() === $this) {
  573.                 $lotCoupon->setEvenement(null);
  574.             }
  575.         }
  576.         return $this;
  577.     }
  578. }