src/Entity/AnneeExercice.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AnneeExerciceRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=AnneeExerciceRepository::class)
  9.  */
  10. class AnneeExercice
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\ManyToOne(targetEntity=Amicale::class, inversedBy="anneeExercices")
  20.      * @ORM\JoinColumn(nullable=false)
  21.      */
  22.     private $amicale;
  23.     /**
  24.      * @ORM\Column(type="string", length=4)
  25.      */
  26.     private $annee;
  27.     /**
  28.      * @ORM\Column(type="float")
  29.      */
  30.     private $palafon;
  31.     /**
  32.      * @ORM\OneToMany(targetEntity=Verssement::class, mappedBy="anneeExercice")
  33.      */
  34.     private $verssements;
  35.     /**
  36.      * @ORM\OneToMany(targetEntity=Prestation::class, mappedBy="anneeExercice")
  37.      */
  38.     private $prestations;
  39.     /**
  40.      * @ORM\Column(type="date")
  41.      */
  42.     private $dateInsertion;
  43.     /**
  44.      * @ORM\OneToMany(targetEntity=Prime::class, mappedBy="anneExercices")
  45.      */
  46.     private $primes;
  47.     public function __construct()
  48.     {
  49.         $this->verssements = new ArrayCollection();
  50.         $this->prestations = new ArrayCollection();
  51.         $this->primes = new ArrayCollection();
  52.     }
  53.     public function getId(): ?int
  54.     {
  55.         return $this->id;
  56.     }
  57.     public function getAmicale(): ?Amicale
  58.     {
  59.         return $this->amicale;
  60.     }
  61.     public function setAmicale(?Amicale $amicale): self
  62.     {
  63.         $this->amicale = $amicale;
  64.         return $this;
  65.     }
  66.     public function getAnnee(): ?string
  67.     {
  68.         return $this->annee;
  69.     }
  70.     public function setAnnee(string $annee): self
  71.     {
  72.         $this->annee = $annee;
  73.         return $this;
  74.     }
  75.     public function getPalafon(): ?float
  76.     {
  77.         return $this->palafon;
  78.     }
  79.     public function setPalafon(float $palafon): self
  80.     {
  81.         $this->palafon = $palafon;
  82.         return $this;
  83.     }
  84.     /**
  85.      * @return Collection<int, Verssement>
  86.      */
  87.     public function getVerssements(): Collection
  88.     {
  89.         return $this->verssements;
  90.     }
  91.     public function addVerssement(Verssement $verssement): self
  92.     {
  93.         if (!$this->verssements->contains($verssement)) {
  94.             $this->verssements[] = $verssement;
  95.             $verssement->setAnneeExercice($this);
  96.         }
  97.         return $this;
  98.     }
  99.     public function removeVerssement(Verssement $verssement): self
  100.     {
  101.         if ($this->verssements->removeElement($verssement)) {
  102.             // set the owning side to null (unless already changed)
  103.             if ($verssement->getAnneeExercice() === $this) {
  104.                 $verssement->setAnneeExercice(null);
  105.             }
  106.         }
  107.         return $this;
  108.     }
  109.     /**
  110.      * @return Collection<int, Prestation>
  111.      */
  112.     public function getPrestations(): Collection
  113.     {
  114.         return $this->prestations;
  115.     }
  116.     public function addPrestation(Prestation $prestation): self
  117.     {
  118.         if (!$this->prestations->contains($prestation)) {
  119.             $this->prestations[] = $prestation;
  120.             $prestation->setAnneeExercice($this);
  121.         }
  122.         return $this;
  123.     }
  124.     public function removePrestation(Prestation $prestation): self
  125.     {
  126.         if ($this->prestations->removeElement($prestation)) {
  127.             // set the owning side to null (unless already changed)
  128.             if ($prestation->getAnneeExercice() === $this) {
  129.                 $prestation->setAnneeExercice(null);
  130.             }
  131.         }
  132.         return $this;
  133.     }
  134.     public function getDateInsertion(): ?\DateTimeInterface
  135.     {
  136.         return $this->dateInsertion;
  137.     }
  138.     public function setDateInsertion(\DateTimeInterface $dateInsertion): self
  139.     {
  140.         $this->dateInsertion = $dateInsertion;
  141.         return $this;
  142.     }
  143.     /**
  144.      * @return Collection<int, Prime>
  145.      */
  146.     public function getPrimes(): Collection
  147.     {
  148.         return $this->primes;
  149.     }
  150.     public function addPrime(Prime $prime): self
  151.     {
  152.         if (!$this->primes->contains($prime)) {
  153.             $this->primes[] = $prime;
  154.             $prime->setAnneExercices($this);
  155.         }
  156.         return $this;
  157.     }
  158.     public function removePrime(Prime $prime): self
  159.     {
  160.         if ($this->primes->removeElement($prime)) {
  161.             // set the owning side to null (unless already changed)
  162.             if ($prime->getAnneExercices() === $this) {
  163.                 $prime->setAnneExercices(null);
  164.             }
  165.         }
  166.         return $this;
  167.     }
  168. }