src/Entity/Mois.php line 12
<?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]private ?int $id = null;#[ORM\Column(length: 100, nullable: true)]private ?string $libelle = null;#[ORM\ManyToOne(inversedBy: 'mois')]private ?Annee $annee = null;#[ORM\Column(length: 5, nullable: true)]private ?string $name = null;#[ORM\Column]private ?bool $isGenerate = null;#[ORM\ManyToMany(targetEntity: Payment::class, mappedBy: 'mois')]private Collection $payments;#[ORM\OneToMany(mappedBy: 'month', targetEntity: PaymentGenerator::class)]private Collection $paymentGenerators;public function __construct(){$this->payments = new ArrayCollection();$this->paymentGenerators = new ArrayCollection();}/*** @return int|null*/public function getId(): ?int{return $this->id;}/*** @param int|null $id*/public function setId(?int $id): void{$this->id = $id;}/*** @return string|null*/public function getLibelle(): ?string{return $this->libelle;}/*** @param string|null $libelle*/public function setLibelle(?string $libelle): void{$this->libelle = $libelle;}/*** @return Annee|null*/public function getAnnee(): ?Annee{return $this->annee;}/*** @param Annee|null $annee*/public function setAnnee(?Annee $annee): void{$this->annee = $annee;}/*** @return string|null*/public function getName(): ?string{return $this->name;}/*** @param string|null $name*/public function setName(?string $name): void{$this->name = $name;}/*** @return bool|null*/public function getIsGenerate(): ?bool{return $this->isGenerate;}/*** @param bool|null $isGenerate*/public function setIsGenerate(?bool $isGenerate): void{$this->isGenerate = $isGenerate;}public function __toString(){return $this->libelle;}/*** @return Collection<int, Payment>*/public function getPayments(): Collection{return $this->payments;}public function addPayment(Payment $payment): static{if (!$this->payments->contains($payment)) {$this->payments->add($payment);$payment->addMoi($this);}return $this;}public function removePayment(Payment $payment): static{if ($this->payments->removeElement($payment)) {$payment->removeMoi($this);}return $this;}/*** @return Collection<int, PaymentGenerator>*/public function getPaymentGenerators(): Collection{return $this->paymentGenerators;}public function addPaymentGenerator(PaymentGenerator $paymentGenerator): static{if (!$this->paymentGenerators->contains($paymentGenerator)) {$this->paymentGenerators->add($paymentGenerator);$paymentGenerator->setMonth($this);}return $this;}public function removePaymentGenerator(PaymentGenerator $paymentGenerator): static{if ($this->paymentGenerators->removeElement($paymentGenerator)) {// set the owning side to null (unless already changed)if ($paymentGenerator->getMonth() === $this) {$paymentGenerator->setMonth(null);}}return $this;}}