<?php
namespace App\Entity;
use App\Repository\AdherentRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=AdherentRepository::class)
*/
class Adherent
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $nom;
/**
* @ORM\Column(type="string", length=255)
*/
private $prenom;
/**
* @ORM\Column(type="string", length=255)
*/
private $numeroAdhesion;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $email;
/**
* @ORM\OneToMany(targetEntity=Prestation::class, mappedBy="adherent", orphanRemoval=true)
*/
private $typePrestation;
/**
* @ORM\OneToMany(targetEntity=Facture::class, mappedBy="adherent")
*/
private $factures;
/**
* @ORM\OneToMany(targetEntity=Dette::class, mappedBy="adherent")
*/
private $dettes;
/**
* @ORM\OneToMany(targetEntity=Prime::class, mappedBy="adherent")
*/
private $primes;
/**
* @ORM\OneToOne(targetEntity=User::class, cascade={"persist", "remove"})
*/
private $userCompte;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $salaireBrute;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $rip;
/**
* @ORM\OneToMany(targetEntity=Enfant::class, mappedBy="adherent")
*/
private $enfants;
/**
* @ORM\OneToOne(targetEntity=Vehicule::class, mappedBy="adherent", cascade={"persist", "remove"})
*/
private $vehicule;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $forfaitTelecom;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $nomPrenom;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $matricule;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $rang;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $etat;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $marier;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $conjoint;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $finForfait;
public function __construct()
{
$this->typePrestation = new ArrayCollection();
$this->factures = new ArrayCollection();
$this->dettes = new ArrayCollection();
$this->primes = new ArrayCollection();
$this->enfants = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getNom(): ?string
{
return $this->nom;
}
public function setNom(string $nom): self
{
$this->nom = $nom;
return $this;
}
public function getPrenom(): ?string
{
return $this->prenom;
}
public function setPrenom(string $prenom): self
{
$this->prenom = $prenom;
return $this;
}
public function getNumeroAdhesion(): ?string
{
return $this->numeroAdhesion;
}
public function setNumeroAdhesion(string $numeroAdhesion): self
{
$this->numeroAdhesion = $numeroAdhesion;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(?string $email): self
{
$this->email = $email;
return $this;
}
/**
* @return Collection<int, Prestation>
*/
public function getTypePrestation(): Collection
{
return $this->typePrestation;
}
public function addTypePrestation(Prestation $typePrestation): self
{
if (!$this->typePrestation->contains($typePrestation)) {
$this->typePrestation[] = $typePrestation;
$typePrestation->setAdherent($this);
}
return $this;
}
public function removeTypePrestation(Prestation $typePrestation): self
{
if ($this->typePrestation->removeElement($typePrestation)) {
// set the owning side to null (unless already changed)
if ($typePrestation->getAdherent() === $this) {
$typePrestation->setAdherent(null);
}
}
return $this;
}
/**
* @return Collection<int, Facture>
*/
public function getFactures(): Collection
{
return $this->factures;
}
public function addFacture(Facture $facture): self
{
if (!$this->factures->contains($facture)) {
$this->factures[] = $facture;
$facture->setAdherent($this);
}
return $this;
}
public function removeFacture(Facture $facture): self
{
if ($this->factures->removeElement($facture)) {
// set the owning side to null (unless already changed)
if ($facture->getAdherent() === $this) {
$facture->setAdherent(null);
}
}
return $this;
}
/**
* @return Collection<int, Dette>
*/
public function getDettes(): Collection
{
return $this->dettes;
}
public function addDette(Dette $dette): self
{
if (!$this->dettes->contains($dette)) {
$this->dettes[] = $dette;
$dette->setAdherent($this);
}
return $this;
}
public function removeDette(Dette $dette): self
{
if ($this->dettes->removeElement($dette)) {
// set the owning side to null (unless already changed)
if ($dette->getAdherent() === $this) {
$dette->setAdherent(null);
}
}
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->setAdherent($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->getAdherent() === $this) {
$prime->setAdherent(null);
}
}
return $this;
}
public function getUserCompte(): ?User
{
return $this->userCompte;
}
public function setUserCompte(?User $userCompte): self
{
$this->userCompte = $userCompte;
return $this;
}
public function getSalaireBrute(): ?float
{
return $this->salaireBrute;
}
public function setSalaireBrute(?float $salaireBrute): self
{
$this->salaireBrute = $salaireBrute;
return $this;
}
public function getRip(): ?string
{
return $this->rip;
}
public function setRip(?string $rip): self
{
$this->rip = $rip;
return $this;
}
/**
* @return Collection<int, Enfant>
*/
public function getEnfants(): Collection
{
return $this->enfants;
}
public function addEnfant(Enfant $enfant): self
{
if (!$this->enfants->contains($enfant)) {
$this->enfants[] = $enfant;
$enfant->setAdherent($this);
}
return $this;
}
public function removeEnfant(Enfant $enfant): self
{
if ($this->enfants->removeElement($enfant)) {
// set the owning side to null (unless already changed)
if ($enfant->getAdherent() === $this) {
$enfant->setAdherent(null);
}
}
return $this;
}
public function getVehicule(): ?Vehicule
{
return $this->vehicule;
}
public function setVehicule(?Vehicule $vehicule): self
{
// unset the owning side of the relation if necessary
if ($vehicule === null && $this->vehicule !== null) {
$this->vehicule->setAdherent(null);
}
// set the owning side of the relation if necessary
if ($vehicule !== null && $vehicule->getAdherent() !== $this) {
$vehicule->setAdherent($this);
}
$this->vehicule = $vehicule;
return $this;
}
public function getForfaitTelecom(): ?float
{
return $this->forfaitTelecom;
}
public function setForfaitTelecom(?float $forfaitTelecom): self
{
$this->forfaitTelecom = $forfaitTelecom;
return $this;
}
public function getNomPrenom(): ?string
{
return $this->nomPrenom;
}
public function setNomPrenom(?string $nomPrenom): self
{
$this->nomPrenom = $nomPrenom;
return $this;
}
public function getMatricule(): ?string
{
return $this->matricule;
}
public function setMatricule(?string $matricule): self
{
$this->matricule = $matricule;
return $this;
}
public function getRang(): ?string
{
return $this->rang;
}
public function setRang(?string $rang): self
{
$this->rang = $rang;
return $this;
}
public function getEtat(): ?string
{
return $this->etat;
}
public function setEtat(?string $etat): self
{
$this->etat = $etat;
return $this;
}
public function isMarier(): ?bool
{
return $this->marier;
}
public function setMarier(?bool $marier): self
{
$this->marier = $marier;
return $this;
}
public function getConjoint(): ?string
{
return $this->conjoint;
}
public function setConjoint(?string $conjoint): self
{
$this->conjoint = $conjoint;
return $this;
}
public function getFinForfait(): ?int
{
return $this->finForfait;
}
public function setFinForfait(?int $finForfait): self
{
$this->finForfait = $finForfait;
return $this;
}
}