src/Entity/Evenement.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\EvenementRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Gedmo\Mapping\Annotation as Gedmo;
  9. #[ORM\Entity(repositoryClassEvenementRepository::class)]
  10. class Evenement
  11. {
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column(type'integer')]
  15.     private $id;
  16.     #[ORM\Column(type'string'length255)]
  17.     private $titre;
  18.     #[ORM\Column(type'text'nullabletrue)]
  19.     private $description;
  20.     #[ORM\Column(type'date'nullabletrue)]
  21.     private $date;
  22.     #[ORM\Column(type'time'nullabletrue)]
  23.     private $heure;
  24.     #[ORM\Column(type'string'length255nullabletrue)]
  25.     private $lieu;
  26.     #[ORM\ManyToOne(targetEntityTypeEvenement::class, inversedBy'evenements')]
  27.     private $type;
  28.     #[Gedmo\Timestampable(on'create')]
  29.     #[ORM\Column(type'datetime')]
  30.     private $created_at;
  31.     #[Gedmo\Timestampable(on'update')]
  32.     #[ORM\Column(type'datetime')]
  33.     private $updated_at;
  34.     #[ORM\Column(type'integer')]
  35.     private $created_by;
  36.     #[ORM\Column(type'integer')]
  37.     private $updated_by;
  38.     #[ORM\Column(type'string'length255nullabletrue)]
  39.     private $file;
  40.     #[ORM\Column(type'boolean'nullabletrue)]
  41.     private $une=false;
  42.     #[ORM\Column(length255nullabletrue)]
  43.     private ?string $photo null;
  44.     #[ORM\ManyToOne(inversedBy'evenements')]
  45.     private ?Groupe $groupe null;
  46.     #[ORM\OneToMany(mappedBy'evenement'targetEntityCommentaireEvenement::class)]
  47.     private Collection $commentaires;
  48.     public function getId(): ?int
  49.     {
  50.         return $this->id;
  51.     }
  52.     public function getTitre(): ?string
  53.     {
  54.         return $this->titre;
  55.     }
  56.     public function setTitre(string $titre): self
  57.     {
  58.         $this->titre $titre;
  59.         return $this;
  60.     }
  61.     public function getDescription(): ?string
  62.     {
  63.         return $this->description;
  64.     }
  65.     public function setDescription(?string $description): self
  66.     {
  67.         $this->description $description;
  68.         return $this;
  69.     }
  70.     public function getDate(): ?\DateTimeInterface
  71.     {
  72.         return $this->date;
  73.     }
  74.     public function setDate(?\DateTimeInterface $date): self
  75.     {
  76.         $this->date $date;
  77.         return $this;
  78.     }
  79.     public function getHeure(): ?\DateTimeInterface
  80.     {
  81.         return $this->heure;
  82.     }
  83.     public function setHeure(?\DateTimeInterface $heure): self
  84.     {
  85.         $this->heure $heure;
  86.         return $this;
  87.     }
  88.     public function getLieu(): ?string
  89.     {
  90.         return $this->lieu;
  91.     }
  92.     public function setLieu(?string $lieu): self
  93.     {
  94.         $this->lieu $lieu;
  95.         return $this;
  96.     }
  97.     public function getType(): ?TypeEvenement
  98.     {
  99.         return $this->type;
  100.     }
  101.     public function setType(?TypeEvenement $type): self
  102.     {
  103.         $this->type $type;
  104.         return $this;
  105.     }
  106.     public function getCreatedAt(): ?\DateTimeInterface
  107.     {
  108.         return $this->created_at;
  109.     }
  110.     public function setCreatedAt(\DateTimeInterface $created_at): self
  111.     {
  112.         $this->created_at $created_at;
  113.         return $this;
  114.     }
  115.     public function getUpdatedAt(): ?\DateTimeInterface
  116.     {
  117.         return $this->updated_at;
  118.     }
  119.     public function setUpdatedAt(\DateTimeInterface $updated_at): self
  120.     {
  121.         $this->updated_at $updated_at;
  122.         return $this;
  123.     }
  124.     public function getCreatedBy(): ?int
  125.     {
  126.         return $this->created_by;
  127.     }
  128.     public function setCreatedBy(int $created_by): self
  129.     {
  130.         $this->created_by $created_by;
  131.         return $this;
  132.     }
  133.     public function getUpdatedBy(): ?int
  134.     {
  135.         return $this->updated_by;
  136.     }
  137.     public function setUpdatedBy(int $updated_by): self
  138.     {
  139.         $this->updated_by $updated_by;
  140.         return $this;
  141.     }
  142.     public function getFile(): ?string
  143.     {
  144.         return $this->file;
  145.     }
  146.     public function setFile(?string $file): self
  147.     {
  148.         $this->file $file;
  149.         return $this;
  150.     }
  151.     public function getPhoto(): ?string
  152.     {
  153.         return $this->photo;
  154.     }
  155.     public function setPhoto(?string $photo): self
  156.     {
  157.         $this->photo $photo;
  158.         return $this;
  159.     }
  160.     public function isUne(): ?bool
  161.     {
  162.         return $this->une;
  163.     }
  164.     public function setUne(?bool $une): self
  165.     {
  166.         $this->une $une;
  167.         return $this;
  168.     }
  169.     public function getGroupe(): ?Groupe
  170.     {
  171.         return $this->groupe;
  172.     }
  173.     public function setGroupe(?Groupe $groupe): self
  174.     {
  175.         $this->groupe $groupe;
  176.         return $this;
  177.     }
  178.     /**
  179.      * @return Collection<int, Commentaire>
  180.      */
  181.     public function getCommentaires(): Collection
  182.     {
  183.         return $this->commentaires;
  184.     }
  185.     public function addCommentaire(Commentaire $commentaire): self
  186.     {
  187.         if (!$this->commentaires->contains($commentaire)) {
  188.             $this->commentaires->add($commentaire);
  189.             $commentaire->setEvenement($this);
  190.         }
  191.         return $this;
  192.     }
  193.     public function removeCommentaire(Commentaire $commentaire): self
  194.     {
  195.         if ($this->commentaires->removeElement($commentaire)) {
  196.             // set the owning side to null (unless already changed)
  197.             if ($commentaire->setEvenement() === $this) {
  198.                 $commentaire->setEvenement(null);
  199.             }
  200.         }
  201.         return $this;
  202.     }
  203. }