src/Entity/Prestation.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PrestationRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. /**
  9.  * @ORM\Entity(repositoryClass=PrestationRepository::class)
  10.  *
  11.  */
  12. class Prestation
  13. {
  14.     /**
  15.      * @ORM\Id
  16.      * @ORM\GeneratedValue
  17.      * @ORM\Column(type="integer")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @ORM\ManyToOne(targetEntity=Adherent::class, inversedBy="typePrestation")
  22.      * @ORM\JoinColumn(nullable=true)
  23.      */
  24.     private $adherent;
  25.     /**
  26.      * @ORM\ManyToOne(targetEntity=TypePrestation::class, inversedBy="prestations")
  27.      * @ORM\JoinColumn(nullable=false)
  28.      */
  29.     private $typePrestation;
  30.     /**
  31.      * @ORM\Column(type="float", nullable=true)
  32.      */
  33.     private $valeur;
  34.     /**
  35.      * @ORM\OneToMany(targetEntity=Document::class, mappedBy="prestations",cascade={"persist","remove"})
  36.      * @Assert\Valid
  37.      */
  38.     private $documents;
  39.     /**
  40.      * @ORM\Column(type="string", length=255)
  41.      */
  42.     private $etat;
  43.     /**
  44.      * @ORM\Column(type="float", nullable=true)
  45.      */
  46.     private $valeurPayer;
  47.     /**
  48.      * @ORM\ManyToOne(targetEntity=AnneeExercice::class, inversedBy="prestations")
  49.      */
  50.     private $anneeExercice;
  51.     /**
  52.      * @ORM\Column(type="date", nullable=true)
  53.      */
  54.     private $dateInsertion;
  55.     /**
  56.      * @ORM\Column(type="integer", nullable=true)
  57.      */
  58.     private $mois;
  59.     /**
  60.      * @ORM\ManyToOne(targetEntity=Parking::class, inversedBy="prestations")
  61.      */
  62.     private $parking;
  63.     /**
  64.      * @ORM\ManyToOne(targetEntity=Enfant::class, inversedBy="prestations")
  65.      */
  66.     private $enfant;
  67.     /**
  68.      * @ORM\Column(type="integer", nullable=true)
  69.      */
  70.     private $nbMois;
  71.     /**
  72.      * @ORM\Column(type="float", nullable=true)
  73.      */
  74.     private $montantMois;
  75.     public function __construct()
  76.     {
  77.         $this->documents = new ArrayCollection();
  78.     }
  79.     public function getId(): ?int
  80.     {
  81.         return $this->id;
  82.     }
  83.     public function getAdherent(): ?Adherent
  84.     {
  85.         return $this->adherent;
  86.     }
  87.     public function setAdherent(?Adherent $adherent): self
  88.     {
  89.         $this->adherent = $adherent;
  90.         return $this;
  91.     }
  92.     public function getTypePrestation(): ?TypePrestation
  93.     {
  94.         return $this->typePrestation;
  95.     }
  96.     public function setTypePrestation(?TypePrestation $typePrestation): self
  97.     {
  98.         $this->typePrestation = $typePrestation;
  99.         return $this;
  100.     }
  101.     public function getValeur(): ?float
  102.     {
  103.         return $this->valeur;
  104.     }
  105.     public function setValeur(?float $valeur): self
  106.     {
  107.         $this->valeur = $valeur;
  108.         return $this;
  109.     }
  110.     /**
  111.      * @return Collection<int, Document>
  112.      */
  113.     public function getDocuments(): Collection
  114.     {
  115.         return $this->documents;
  116.     }
  117.     public function addDocument(Document $document): self
  118.     {
  119.         if (!$this->documents->contains($document)) {
  120.             $this->documents[] = $document;
  121.             $document->setPrestations($this);
  122.         }
  123.         return $this;
  124.     }
  125.     public function removeDocument(Document $document): self
  126.     {
  127.         if ($this->documents->removeElement($document)) {
  128.             // set the owning side to null (unless already changed)
  129.             if ($document->getPrestations() === $this) {
  130.                 $document->setPrestations(null);
  131.             }
  132.         }
  133.         return $this;
  134.     }
  135.     public function getEtat(): ?string
  136.     {
  137.         return $this->etat;
  138.     }
  139.     public function setEtat(string $etat): self
  140.     {
  141.         $this->etat = $etat;
  142.         return $this;
  143.     }
  144.     public function getValeurPayer(): ?float
  145.     {
  146.         return $this->valeurPayer;
  147.     }
  148.     public function setValeurPayer(?float $valeurPayer): self
  149.     {
  150.         $this->valeurPayer = $valeurPayer;
  151.         return $this;
  152.     }
  153.     public function getAnneeExercice(): ?AnneeExercice
  154.     {
  155.         return $this->anneeExercice;
  156.     }
  157.     public function setAnneeExercice(?AnneeExercice $anneeExercice): self
  158.     {
  159.         $this->anneeExercice = $anneeExercice;
  160.         return $this;
  161.     }
  162.     public function getDateInsertion(): ?\DateTimeInterface
  163.     {
  164.         return $this->dateInsertion;
  165.     }
  166.     public function setDateInsertion(?\DateTimeInterface $dateInsertion): self
  167.     {
  168.         $this->dateInsertion = $dateInsertion;
  169.         return $this;
  170.     }
  171.     public function getMois(): ?int
  172.     {
  173.         return $this->mois;
  174.     }
  175.     public function setMois(?int $mois): self
  176.     {
  177.         $this->mois = $mois;
  178.         return $this;
  179.     }
  180.     public function getParking(): ?Parking
  181.     {
  182.         return $this->parking;
  183.     }
  184.     public function setParking(?Parking $parking): self
  185.     {
  186.         $this->parking = $parking;
  187.         return $this;
  188.     }
  189.     public function getEnfant(): ?Enfant
  190.     {
  191.         return $this->enfant;
  192.     }
  193.     public function setEnfant(?Enfant $enfant): self
  194.     {
  195.         $this->enfant = $enfant;
  196.         return $this;
  197.     }
  198.     public function getNbMois(): ?int
  199.     {
  200.         return $this->nbMois;
  201.     }
  202.     public function setNbMois(?int $nbMois): self
  203.     {
  204.         $this->nbMois = $nbMois;
  205.         return $this;
  206.     }
  207.     public function getMontantMois(): ?float
  208.     {
  209.         return $this->montantMois;
  210.     }
  211.     public function setMontantMois(?float $montantMois): self
  212.     {
  213.         $this->montantMois = $montantMois;
  214.         return $this;
  215.     }
  216. }