src/Entity/Etiquette.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass="App\Repository\EtiquetteRepository")
  8.  */
  9. class Etiquette
  10. {
  11.     /**
  12.      * @ORM\Id()
  13.      * @ORM\GeneratedValue()
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=255, nullable=true)
  19.      */
  20.     private $titre;
  21.     /**
  22.      * @ORM\Column(type="datetime", nullable=true)
  23.      */
  24.     private $dateCreation;
  25.     /**
  26.      * @ORM\Column(type="string", length=255, nullable=true)
  27.      */
  28.     private $etat;
  29.     /**
  30.      * @ORM\Column(type="string", length=255, nullable=true)
  31.      */
  32.     private $statut;
  33.     /**
  34.      * @ORM\Column(type="text", nullable=true)
  35.      */
  36.     private $description;
  37.     /**
  38.      * @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="etiquettes")
  39.      */
  40.     private $support;
  41.     /**
  42.      * @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="etiquetteRapporteur")
  43.      */
  44.     private $rapporteur;
  45.     /**
  46.      * @ORM\OneToMany(targetEntity="App\Entity\CommentaireEtiquette", mappedBy="etiquette")
  47.      */
  48.     private $commentaireEtiquettes;
  49.     /**
  50.      * @ORM\OneToMany(targetEntity="App\Entity\AttachementEtiquette", mappedBy="idEtiquette")
  51.      */
  52.     private $attachementEtiquettes;
  53.     public function __construct()
  54.     {
  55.         $this->commentaireEtiquettes = new ArrayCollection();
  56.         $this->attachementEtiquettes = new ArrayCollection();
  57.     }
  58.     public function getId(): ?int
  59.     {
  60.         return $this->id;
  61.     }
  62.     public function getTitre(): ?string
  63.     {
  64.         return $this->titre;
  65.     }
  66.     public function setTitre(?string $titre): self
  67.     {
  68.         $this->titre $titre;
  69.         return $this;
  70.     }
  71.     public function getDateCreation(): ?\DateTimeInterface
  72.     {
  73.         return $this->dateCreation;
  74.     }
  75.     public function setDateCreation(?\DateTimeInterface $dateCreation): self
  76.     {
  77.         $this->dateCreation $dateCreation;
  78.         return $this;
  79.     }
  80.     public function getEtat(): ?string
  81.     {
  82.         return $this->etat;
  83.     }
  84.     public function setEtat(?string $etat): self
  85.     {
  86.         $this->etat $etat;
  87.         return $this;
  88.     }
  89.     public function getStatut(): ?string
  90.     {
  91.         return $this->statut;
  92.     }
  93.     public function setStatut(?string $statut): self
  94.     {
  95.         $this->statut $statut;
  96.         return $this;
  97.     }
  98.     public function getDescription(): ?string
  99.     {
  100.         return $this->description;
  101.     }
  102.     public function setDescription(?string $description): self
  103.     {
  104.         $this->description $description;
  105.         return $this;
  106.     }
  107.     public function getSupport(): ?User
  108.     {
  109.         return $this->support;
  110.     }
  111.     public function setSupport(?User $support): self
  112.     {
  113.         $this->support $support;
  114.         return $this;
  115.     }
  116.     public function getRapporteur(): ?User
  117.     {
  118.         return $this->rapporteur;
  119.     }
  120.     public function setRapporteur(?User $rapporteur): self
  121.     {
  122.         $this->rapporteur $rapporteur;
  123.         return $this;
  124.     }
  125.     /**
  126.      * @return Collection|CommentaireEtiquette[]
  127.      */
  128.     public function getCommentaireEtiquettes(): Collection
  129.     {
  130.         return $this->commentaireEtiquettes;
  131.     }
  132.     public function addCommentaireEtiquette(CommentaireEtiquette $commentaireEtiquette): self
  133.     {
  134.         if (!$this->commentaireEtiquettes->contains($commentaireEtiquette)) {
  135.             $this->commentaireEtiquettes[] = $commentaireEtiquette;
  136.             $commentaireEtiquette->setEtiquette($this);
  137.         }
  138.         return $this;
  139.     }
  140.     public function removeCommentaireEtiquette(CommentaireEtiquette $commentaireEtiquette): self
  141.     {
  142.         if ($this->commentaireEtiquettes->contains($commentaireEtiquette)) {
  143.             $this->commentaireEtiquettes->removeElement($commentaireEtiquette);
  144.             // set the owning side to null (unless already changed)
  145.             if ($commentaireEtiquette->getEtiquette() === $this) {
  146.                 $commentaireEtiquette->setEtiquette(null);
  147.             }
  148.         }
  149.         return $this;
  150.     }
  151.     /**
  152.      * @return Collection|AttachementEtiquette[]
  153.      */
  154.     public function getAttachementEtiquettes(): Collection
  155.     {
  156.         return $this->attachementEtiquettes;
  157.     }
  158.     public function addAttachementEtiquette(AttachementEtiquette $attachementEtiquette): self
  159.     {
  160.         if (!$this->attachementEtiquettes->contains($attachementEtiquette)) {
  161.             $this->attachementEtiquettes[] = $attachementEtiquette;
  162.             $attachementEtiquette->setIdEtiquette($this);
  163.         }
  164.         return $this;
  165.     }
  166.     public function removeAttachementEtiquette(AttachementEtiquette $attachementEtiquette): self
  167.     {
  168.         if ($this->attachementEtiquettes->contains($attachementEtiquette)) {
  169.             $this->attachementEtiquettes->removeElement($attachementEtiquette);
  170.             // set the owning side to null (unless already changed)
  171.             if ($attachementEtiquette->getIdEtiquette() === $this) {
  172.                 $attachementEtiquette->setIdEtiquette(null);
  173.             }
  174.         }
  175.         return $this;
  176.     }
  177. }