<?phpnamespace App\Entity;use App\Repository\AnneeExerciceRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=AnneeExerciceRepository::class) */class AnneeExercice{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\ManyToOne(targetEntity=Amicale::class, inversedBy="anneeExercices") * @ORM\JoinColumn(nullable=false) */ private $amicale; /** * @ORM\Column(type="string", length=4) */ private $annee; /** * @ORM\Column(type="float") */ private $palafon; /** * @ORM\OneToMany(targetEntity=Verssement::class, mappedBy="anneeExercice") */ private $verssements; /** * @ORM\OneToMany(targetEntity=Prestation::class, mappedBy="anneeExercice") */ private $prestations; /** * @ORM\Column(type="date") */ private $dateInsertion; /** * @ORM\OneToMany(targetEntity=Prime::class, mappedBy="anneExercices") */ private $primes; public function __construct() { $this->verssements = new ArrayCollection(); $this->prestations = new ArrayCollection(); $this->primes = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getAmicale(): ?Amicale { return $this->amicale; } public function setAmicale(?Amicale $amicale): self { $this->amicale = $amicale; return $this; } public function getAnnee(): ?string { return $this->annee; } public function setAnnee(string $annee): self { $this->annee = $annee; return $this; } public function getPalafon(): ?float { return $this->palafon; } public function setPalafon(float $palafon): self { $this->palafon = $palafon; return $this; } /** * @return Collection<int, Verssement> */ public function getVerssements(): Collection { return $this->verssements; } public function addVerssement(Verssement $verssement): self { if (!$this->verssements->contains($verssement)) { $this->verssements[] = $verssement; $verssement->setAnneeExercice($this); } return $this; } public function removeVerssement(Verssement $verssement): self { if ($this->verssements->removeElement($verssement)) { // set the owning side to null (unless already changed) if ($verssement->getAnneeExercice() === $this) { $verssement->setAnneeExercice(null); } } return $this; } /** * @return Collection<int, Prestation> */ public function getPrestations(): Collection { return $this->prestations; } public function addPrestation(Prestation $prestation): self { if (!$this->prestations->contains($prestation)) { $this->prestations[] = $prestation; $prestation->setAnneeExercice($this); } return $this; } public function removePrestation(Prestation $prestation): self { if ($this->prestations->removeElement($prestation)) { // set the owning side to null (unless already changed) if ($prestation->getAnneeExercice() === $this) { $prestation->setAnneeExercice(null); } } return $this; } public function getDateInsertion(): ?\DateTimeInterface { return $this->dateInsertion; } public function setDateInsertion(\DateTimeInterface $dateInsertion): self { $this->dateInsertion = $dateInsertion; return $this; } /** * @return Collection<int, Prime> */ public function getPrimes(): Collection { return $this->primes; } public function addPrime(Prime $prime): self { if (!$this->primes->contains($prime)) { $this->primes[] = $prime; $prime->setAnneExercices($this); } return $this; } public function removePrime(Prime $prime): self { if ($this->primes->removeElement($prime)) { // set the owning side to null (unless already changed) if ($prime->getAnneExercices() === $this) { $prime->setAnneExercices(null); } } return $this; }}