src/Entity/Mois.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\MoisRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=MoisRepository::class)
  9.  */
  10. class Mois
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255, nullable=true)
  20.      */
  21.     private $wording;
  22.     /**
  23.      * @ORM\Column(type="datetime_immutable", nullable=true)
  24.      */
  25.     private $created_at;
  26.     /**
  27.      * @ORM\OneToMany(targetEntity=FactureFormateur::class, mappedBy="mois")
  28.      */
  29.     private $factureFormateurs;
  30.     public function __construct()
  31.     {
  32.         $this->factureFormateurs = new ArrayCollection();
  33.     }
  34.     public function setId(?int $id): self
  35.     {
  36.        $this->id $id;
  37.        
  38.        return $this;
  39.     }
  40.     public function getId(): ?int
  41.     {
  42.         return $this->id;
  43.     }
  44.     public function getWording(): ?string
  45.     {
  46.         return $this->wording;
  47.     }
  48.     public function setWording(?string $wording): self
  49.     {
  50.         $this->wording $wording;
  51.         return $this;
  52.     }
  53.     public function getCreatedAt(): ?\DateTimeImmutable
  54.     {
  55.         return $this->created_at;
  56.     }
  57.     public function setCreatedAt(?\DateTimeImmutable $created_at): self
  58.     {
  59.         $this->created_at $created_at;
  60.         return $this;
  61.     }
  62.     /**
  63.      * @return Collection<int, FactureFormateur>
  64.      */
  65.     public function getFactureFormateurs(): Collection
  66.     {
  67.         return $this->factureFormateurs;
  68.     }
  69.     public function addFactureFormateur(FactureFormateur $factureFormateur): self
  70.     {
  71.         if (!$this->factureFormateurs->contains($factureFormateur)) {
  72.             $this->factureFormateurs[] = $factureFormateur;
  73.             $factureFormateur->setMois($this);
  74.         }
  75.         return $this;
  76.     }
  77.     public function removeFactureFormateur(FactureFormateur $factureFormateur): self
  78.     {
  79.         if ($this->factureFormateurs->removeElement($factureFormateur)) {
  80.             // set the owning side to null (unless already changed)
  81.             if ($factureFormateur->getMois() === $this) {
  82.                 $factureFormateur->setMois(null);
  83.             }
  84.         }
  85.         return $this;
  86.     }
  87. }