<?phpnamespace App\Entity;use App\Repository\MoisRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=MoisRepository::class) */class Mois{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $wording; /** * @ORM\Column(type="datetime_immutable", nullable=true) */ private $created_at; /** * @ORM\OneToMany(targetEntity=FactureFormateur::class, mappedBy="mois") */ private $factureFormateurs; public function __construct() { $this->factureFormateurs = new ArrayCollection(); } public function setId(?int $id): self { $this->id = $id; return $this; } public function getId(): ?int { return $this->id; } public function getWording(): ?string { return $this->wording; } public function setWording(?string $wording): self { $this->wording = $wording; return $this; } public function getCreatedAt(): ?\DateTimeImmutable { return $this->created_at; } public function setCreatedAt(?\DateTimeImmutable $created_at): self { $this->created_at = $created_at; return $this; } /** * @return Collection<int, FactureFormateur> */ public function getFactureFormateurs(): Collection { return $this->factureFormateurs; } public function addFactureFormateur(FactureFormateur $factureFormateur): self { if (!$this->factureFormateurs->contains($factureFormateur)) { $this->factureFormateurs[] = $factureFormateur; $factureFormateur->setMois($this); } return $this; } public function removeFactureFormateur(FactureFormateur $factureFormateur): self { if ($this->factureFormateurs->removeElement($factureFormateur)) { // set the owning side to null (unless already changed) if ($factureFormateur->getMois() === $this) { $factureFormateur->setMois(null); } } return $this; }}