src/Entity/PStatut.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PStatutRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassPStatutRepository::class)]
  8. class PStatut
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(length255)]
  15.     private ?string $designation null;
  16.     #[ORM\Column(length255nullabletrue)]
  17.     private ?string $icon null;
  18.     #[ORM\OneToMany(mappedBy'statut'targetEntityDemandeConge::class)]
  19.     private Collection $demandeConges;
  20.     #[ORM\Column(length255nullabletrue)]
  21.     private ?string $type null;
  22.     public function __construct()
  23.     {
  24.         $this->demandeConges = new ArrayCollection();
  25.     }
  26.     public function getId(): ?int
  27.     {
  28.         return $this->id;
  29.     }
  30.     public function getDesignation(): ?string
  31.     {
  32.         return $this->designation;
  33.     }
  34.     public function setDesignation(string $designation): self
  35.     {
  36.         $this->designation $designation;
  37.         return $this;
  38.     }
  39.     public function getIcon(): ?string
  40.     {
  41.         return $this->icon;
  42.     }
  43.     public function setIcon(?string $icon): self
  44.     {
  45.         $this->icon $icon;
  46.         return $this;
  47.     }
  48.     /**
  49.      * @return Collection<int, DemandeConge>
  50.      */
  51.     public function getDemandeConges(): Collection
  52.     {
  53.         return $this->demandeConges;
  54.     }
  55.     public function addDemandeConge(DemandeConge $demandeConge): static
  56.     {
  57.         if (!$this->demandeConges->contains($demandeConge)) {
  58.             $this->demandeConges->add($demandeConge);
  59.             $demandeConge->setStatut($this);
  60.         }
  61.         return $this;
  62.     }
  63.     public function removeDemandeConge(DemandeConge $demandeConge): static
  64.     {
  65.         if ($this->demandeConges->removeElement($demandeConge)) {
  66.             // set the owning side to null (unless already changed)
  67.             if ($demandeConge->getStatut() === $this) {
  68.                 $demandeConge->setStatut(null);
  69.             }
  70.         }
  71.         return $this;
  72.     }
  73.     public function getType(): ?string
  74.     {
  75.         return $this->type;
  76.     }
  77.     public function setType(?string $type): static
  78.     {
  79.         $this->type $type;
  80.         return $this;
  81.     }
  82. }