src/Entity/Adherent.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AdherentRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=AdherentRepository::class)
  9.  */
  10. class Adherent
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255)
  20.      */
  21.     private $nom;
  22.     /**
  23.      * @ORM\Column(type="string", length=255)
  24.      */
  25.     private $prenom;
  26.     /**
  27.      * @ORM\Column(type="string", length=255)
  28.      */
  29.     private $numeroAdhesion;
  30.     /**
  31.      * @ORM\Column(type="string", length=255, nullable=true)
  32.      */
  33.     private $email;
  34.     /**
  35.      * @ORM\OneToMany(targetEntity=Prestation::class, mappedBy="adherent", orphanRemoval=true)
  36.      */
  37.     private $typePrestation;
  38.     /**
  39.      * @ORM\OneToMany(targetEntity=Facture::class, mappedBy="adherent")
  40.      */
  41.     private $factures;
  42.     /**
  43.      * @ORM\OneToMany(targetEntity=Dette::class, mappedBy="adherent")
  44.      */
  45.     private $dettes;
  46.     /**
  47.      * @ORM\OneToMany(targetEntity=Prime::class, mappedBy="adherent")
  48.      */
  49.     private $primes;
  50.     /**
  51.      * @ORM\OneToOne(targetEntity=User::class, cascade={"persist", "remove"})
  52.      */
  53.     private $userCompte;
  54.     /**
  55.      * @ORM\Column(type="float", nullable=true)
  56.      */
  57.     private $salaireBrute;
  58.     /**
  59.      * @ORM\Column(type="string", length=255, nullable=true)
  60.      */
  61.     private $rip;
  62.     /**
  63.      * @ORM\OneToMany(targetEntity=Enfant::class, mappedBy="adherent")
  64.      */
  65.     private $enfants;
  66.     /**
  67.      * @ORM\OneToOne(targetEntity=Vehicule::class, mappedBy="adherent", cascade={"persist", "remove"})
  68.      */
  69.     private $vehicule;
  70.     /**
  71.      * @ORM\Column(type="float", nullable=true)
  72.      */
  73.     private $forfaitTelecom;
  74.     /**
  75.      * @ORM\Column(type="string", length=255, nullable=true)
  76.      */
  77.     private $nomPrenom;
  78.     /**
  79.      * @ORM\Column(type="string", length=255, nullable=true)
  80.      */
  81.     private $matricule;
  82.     /**
  83.      * @ORM\Column(type="string", length=255, nullable=true)
  84.      */
  85.     private $rang;
  86.     /**
  87.      * @ORM\Column(type="string", length=255, nullable=true)
  88.      */
  89.     private $etat;
  90.     /**
  91.      * @ORM\Column(type="boolean", nullable=true)
  92.      */
  93.     private $marier;
  94.     /**
  95.      * @ORM\Column(type="string", length=255, nullable=true)
  96.      */
  97.     private $conjoint;
  98.     /**
  99.      * @ORM\Column(type="integer", nullable=true)
  100.      */
  101.     private $finForfait;
  102.     public function __construct()
  103.     {
  104.         $this->typePrestation = new ArrayCollection();
  105.         $this->factures = new ArrayCollection();
  106.         $this->dettes = new ArrayCollection();
  107.         $this->primes = new ArrayCollection();
  108.         $this->enfants = new ArrayCollection();
  109.     }
  110.     public function getId(): ?int
  111.     {
  112.         return $this->id;
  113.     }
  114.     public function getNom(): ?string
  115.     {
  116.         return $this->nom;
  117.     }
  118.     public function setNom(string $nom): self
  119.     {
  120.         $this->nom $nom;
  121.         return $this;
  122.     }
  123.     public function getPrenom(): ?string
  124.     {
  125.         return $this->prenom;
  126.     }
  127.     public function setPrenom(string $prenom): self
  128.     {
  129.         $this->prenom $prenom;
  130.         return $this;
  131.     }
  132.     public function getNumeroAdhesion(): ?string
  133.     {
  134.         return $this->numeroAdhesion;
  135.     }
  136.     public function setNumeroAdhesion(string $numeroAdhesion): self
  137.     {
  138.         $this->numeroAdhesion $numeroAdhesion;
  139.         return $this;
  140.     }
  141.     public function getEmail(): ?string
  142.     {
  143.         return $this->email;
  144.     }
  145.     public function setEmail(?string $email): self
  146.     {
  147.         $this->email $email;
  148.         return $this;
  149.     }
  150.     /**
  151.      * @return Collection<int, Prestation>
  152.      */
  153.     public function getTypePrestation(): Collection
  154.     {
  155.         return $this->typePrestation;
  156.     }
  157.     public function addTypePrestation(Prestation $typePrestation): self
  158.     {
  159.         if (!$this->typePrestation->contains($typePrestation)) {
  160.             $this->typePrestation[] = $typePrestation;
  161.             $typePrestation->setAdherent($this);
  162.         }
  163.         return $this;
  164.     }
  165.     public function removeTypePrestation(Prestation $typePrestation): self
  166.     {
  167.         if ($this->typePrestation->removeElement($typePrestation)) {
  168.             // set the owning side to null (unless already changed)
  169.             if ($typePrestation->getAdherent() === $this) {
  170.                 $typePrestation->setAdherent(null);
  171.             }
  172.         }
  173.         return $this;
  174.     }
  175.     /**
  176.      * @return Collection<int, Facture>
  177.      */
  178.     public function getFactures(): Collection
  179.     {
  180.         return $this->factures;
  181.     }
  182.     public function addFacture(Facture $facture): self
  183.     {
  184.         if (!$this->factures->contains($facture)) {
  185.             $this->factures[] = $facture;
  186.             $facture->setAdherent($this);
  187.         }
  188.         return $this;
  189.     }
  190.     public function removeFacture(Facture $facture): self
  191.     {
  192.         if ($this->factures->removeElement($facture)) {
  193.             // set the owning side to null (unless already changed)
  194.             if ($facture->getAdherent() === $this) {
  195.                 $facture->setAdherent(null);
  196.             }
  197.         }
  198.         return $this;
  199.     }
  200.     /**
  201.      * @return Collection<int, Dette>
  202.      */
  203.     public function getDettes(): Collection
  204.     {
  205.         return $this->dettes;
  206.     }
  207.     public function addDette(Dette $dette): self
  208.     {
  209.         if (!$this->dettes->contains($dette)) {
  210.             $this->dettes[] = $dette;
  211.             $dette->setAdherent($this);
  212.         }
  213.         return $this;
  214.     }
  215.     public function removeDette(Dette $dette): self
  216.     {
  217.         if ($this->dettes->removeElement($dette)) {
  218.             // set the owning side to null (unless already changed)
  219.             if ($dette->getAdherent() === $this) {
  220.                 $dette->setAdherent(null);
  221.             }
  222.         }
  223.         return $this;
  224.     }
  225.     /**
  226.      * @return Collection<int, Prime>
  227.      */
  228.     public function getPrimes(): Collection
  229.     {
  230.         return $this->primes;
  231.     }
  232.     public function addPrime(Prime $prime): self
  233.     {
  234.         if (!$this->primes->contains($prime)) {
  235.             $this->primes[] = $prime;
  236.             $prime->setAdherent($this);
  237.         }
  238.         return $this;
  239.     }
  240.     public function removePrime(Prime $prime): self
  241.     {
  242.         if ($this->primes->removeElement($prime)) {
  243.             // set the owning side to null (unless already changed)
  244.             if ($prime->getAdherent() === $this) {
  245.                 $prime->setAdherent(null);
  246.             }
  247.         }
  248.         return $this;
  249.     }
  250.     public function getUserCompte(): ?User
  251.     {
  252.         return $this->userCompte;
  253.     }
  254.     public function setUserCompte(?User $userCompte): self
  255.     {
  256.         $this->userCompte $userCompte;
  257.         return $this;
  258.     }
  259.     public function getSalaireBrute(): ?float
  260.     {
  261.         return $this->salaireBrute;
  262.     }
  263.     public function setSalaireBrute(?float $salaireBrute): self
  264.     {
  265.         $this->salaireBrute $salaireBrute;
  266.         return $this;
  267.     }
  268.     public function getRip(): ?string
  269.     {
  270.         return $this->rip;
  271.     }
  272.     public function setRip(?string $rip): self
  273.     {
  274.         $this->rip $rip;
  275.         return $this;
  276.     }
  277.     /**
  278.      * @return Collection<int, Enfant>
  279.      */
  280.     public function getEnfants(): Collection
  281.     {
  282.         return $this->enfants;
  283.     }
  284.     public function addEnfant(Enfant $enfant): self
  285.     {
  286.         if (!$this->enfants->contains($enfant)) {
  287.             $this->enfants[] = $enfant;
  288.             $enfant->setAdherent($this);
  289.         }
  290.         return $this;
  291.     }
  292.     public function removeEnfant(Enfant $enfant): self
  293.     {
  294.         if ($this->enfants->removeElement($enfant)) {
  295.             // set the owning side to null (unless already changed)
  296.             if ($enfant->getAdherent() === $this) {
  297.                 $enfant->setAdherent(null);
  298.             }
  299.         }
  300.         return $this;
  301.     }
  302.     public function getVehicule(): ?Vehicule
  303.     {
  304.         return $this->vehicule;
  305.     }
  306.     public function setVehicule(?Vehicule $vehicule): self
  307.     {
  308.         // unset the owning side of the relation if necessary
  309.         if ($vehicule === null && $this->vehicule !== null) {
  310.             $this->vehicule->setAdherent(null);
  311.         }
  312.         // set the owning side of the relation if necessary
  313.         if ($vehicule !== null && $vehicule->getAdherent() !== $this) {
  314.             $vehicule->setAdherent($this);
  315.         }
  316.         $this->vehicule $vehicule;
  317.         return $this;
  318.     }
  319.     public function getForfaitTelecom(): ?float
  320.     {
  321.         return $this->forfaitTelecom;
  322.     }
  323.     public function setForfaitTelecom(?float $forfaitTelecom): self
  324.     {
  325.         $this->forfaitTelecom $forfaitTelecom;
  326.         return $this;
  327.     }
  328.     public function getNomPrenom(): ?string
  329.     {
  330.         return $this->nomPrenom;
  331.     }
  332.     public function setNomPrenom(?string $nomPrenom): self
  333.     {
  334.         $this->nomPrenom $nomPrenom;
  335.         return $this;
  336.     }
  337.     public function getMatricule(): ?string
  338.     {
  339.         return $this->matricule;
  340.     }
  341.     public function setMatricule(?string $matricule): self
  342.     {
  343.         $this->matricule $matricule;
  344.         return $this;
  345.     }
  346.     public function getRang(): ?string
  347.     {
  348.         return $this->rang;
  349.     }
  350.     public function setRang(?string $rang): self
  351.     {
  352.         $this->rang $rang;
  353.         return $this;
  354.     }
  355.     public function getEtat(): ?string
  356.     {
  357.         return $this->etat;
  358.     }
  359.     public function setEtat(?string $etat): self
  360.     {
  361.         $this->etat $etat;
  362.         return $this;
  363.     }
  364.     public function isMarier(): ?bool
  365.     {
  366.         return $this->marier;
  367.     }
  368.     public function setMarier(?bool $marier): self
  369.     {
  370.         $this->marier $marier;
  371.         return $this;
  372.     }
  373.     public function getConjoint(): ?string
  374.     {
  375.         return $this->conjoint;
  376.     }
  377.     public function setConjoint(?string $conjoint): self
  378.     {
  379.         $this->conjoint $conjoint;
  380.         return $this;
  381.     }
  382.     public function getFinForfait(): ?int
  383.     {
  384.         return $this->finForfait;
  385.     }
  386.     public function setFinForfait(?int $finForfait): self
  387.     {
  388.         $this->finForfait $finForfait;
  389.         return $this;
  390.     }
  391. }