src/Entity/Financement.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\FinancementRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=FinancementRepository::class)
  9.  */
  10. class Financement
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=10)
  20.      */
  21.     private $typeF;
  22.     /**
  23.      * @ORM\ManyToOne(targetEntity=CondRegle::class, inversedBy="financements")
  24.      * @ORM\JoinColumn(nullable=true)
  25.      */
  26.     private $conditionreglement;
  27.    
  28.     /**
  29.      * @ORM\Column(type="float", nullable=true)
  30.      */
  31.     private $montant;
  32.     /**
  33.      * @ORM\ManyToOne(targetEntity=Inscrit::class, inversedBy="financements", cascade={"persist"})
  34.      */
  35.     private $inscrit;
  36.     /**
  37.      * @ORM\OneToMany(targetEntity=Reglement::class, mappedBy="financement",cascade={"persist"})
  38.      */
  39.     private $reglements;
  40.     /**
  41.      * @ORM\ManyToOne(targetEntity=Entreprise::class, inversedBy="financements")
  42.      */
  43.     private $entreprise;
  44.      
  45.     /**
  46.      *  @ORM\ManyToOne(targetEntity=Organisme::class, inversedBy="financements")
  47.      */
  48.     private $organisme;
  49.     /**
  50.      * @ORM\Column(type="integer", nullable=true)
  51.      */
  52.     private $frequence;
  53.     /**
  54.      * @ORM\OneToMany(targetEntity=EcheanceInscrit::class, mappedBy="financement", orphanRemoval=true, cascade={"persist"})
  55.      */
  56.     private $echeanceInscrits;
  57.     /**
  58.      * @ORM\OneToOne(targetEntity=LigneFacture::class, mappedBy="financement", cascade={"persist", "remove"})
  59.      */
  60.     private $ligneFacture;
  61.     public function __construct()
  62.     {
  63.         $this->reglements = new ArrayCollection();
  64.         $this->echeanceInscrits = new ArrayCollection();
  65.     }
  66.     
  67.     public function getId(): ?int
  68.     {
  69.         return $this->id;
  70.     }
  71.     public function getTypeF(): ?string
  72.     {
  73.         return $this->typeF;
  74.     }
  75.     public function setTypeF(string $typeF): self
  76.     {
  77.         $this->typeF $typeF;
  78.         return $this;
  79.     }
  80.     public function getConditionreglement(): ?CondRegle
  81.     {
  82.         return $this->conditionreglement;
  83.     }
  84.     public function setConditionreglement(?CondRegle $conditionreglement): self{
  85.          $this->conditionreglement $conditionreglement;
  86.          return $this;
  87.     }
  88.     public function getMontant(): ?float
  89.     {
  90.         return $this->montant;
  91.     }
  92.     public function setMontant(?float $montant): self
  93.     {
  94.         $this->montant $montant;
  95.         return $this;
  96.     }
  97.     public function getInscrit(): ?Inscrit
  98.     {
  99.         return $this->inscrit;
  100.     }
  101.     public function setInscrit(Inscrit $inscrit): self
  102.     {
  103.         $this->inscrit $inscrit;
  104.         return $this;
  105.     }
  106.     /**
  107.      * @return Collection<int, Reglement>
  108.      */
  109.     public function getReglements(): Collection
  110.     {
  111.         return $this->reglements;
  112.     }
  113.     public function addReglement(Reglement $reglement): self
  114.     {
  115.         if (!$this->reglements->contains($reglement)) {
  116.             $this->reglements[] = $reglement;
  117.             $reglement->setFinancement($this);
  118.         }
  119.         return $this;
  120.     }
  121.     public function removeReglement(Reglement $reglement): self
  122.     {
  123.         if ($this->reglements->removeElement($reglement)) {
  124.             // set the owning side to null (unless already changed)
  125.             if ($reglement->getFinancement() === $this) {
  126.                 $reglement->setFinancement(null);
  127.             }
  128.         }
  129.         return $this;
  130.     }
  131.     public function getEntreprise(): ?Entreprise
  132.     {
  133.         return $this->entreprise;
  134.     }
  135.     public function setEntreprise(?Entreprise $entreprise): self
  136.     {
  137.         $this->entreprise $entreprise;
  138.         return $this;
  139.     }
  140.     public function getOrganisme(): ?Organisme
  141.     {
  142.         return $this->organisme;
  143.     }
  144.     public function setOrganisme(?Organisme $organisme): self
  145.     {
  146.         $this->organisme $organisme;
  147.         return $this;
  148.     }
  149.     public function getFrequence(): ?int
  150.     {
  151.         return $this->frequence;
  152.     }
  153.     public function setFrequence(?int $frequence): self
  154.     {
  155.         $this->frequence $frequence;
  156.         return $this;
  157.     }
  158.     /**
  159.      * @return Collection<int, EcheanceInscrit>
  160.      */
  161.     public function getEcheanceInscrits(): Collection
  162.     {
  163.         return $this->echeanceInscrits;
  164.     }
  165.     public function addEcheanceInscrit(EcheanceInscrit $echeanceInscrit): self
  166.     {
  167.         if (!$this->echeanceInscrits->contains($echeanceInscrit)) {
  168.             $this->echeanceInscrits[] = $echeanceInscrit;
  169.             $echeanceInscrit->setFinancement($this);
  170.         }
  171.         return $this;
  172.     }
  173.     public function removeEcheanceInscrit(EcheanceInscrit $echeanceInscrit): self
  174.     {
  175.         if ($this->echeanceInscrits->removeElement($echeanceInscrit)) {
  176.             // set the owning side to null (unless already changed)
  177.             if ($echeanceInscrit->getFinancement() === $this) {
  178.                 $echeanceInscrit->setFinancement(null);
  179.             }
  180.         }
  181.         return $this;
  182.     }
  183.     public function getLigneFacture(): ?LigneFacture
  184.     {
  185.         return $this->ligneFacture;
  186.     }
  187.     public function setLigneFacture(?LigneFacture $ligneFacture): self
  188.     {
  189.         // unset the owning side of the relation if necessary
  190.         if ($ligneFacture === null && $this->ligneFacture !== null) {
  191.             $this->ligneFacture->setFinancement(null);
  192.         }
  193.         // set the owning side of the relation if necessary
  194.         if ($ligneFacture !== null && $ligneFacture->getFinancement() !== $this) {
  195.             $ligneFacture->setFinancement($this);
  196.         }
  197.         $this->ligneFacture $ligneFacture;
  198.         return $this;
  199.     }
  200. }