src/Entity/AutresContacts.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AutresContactsRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassAutresContactsRepository::class)]
  8. class AutresContacts
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(length255)]
  15.     private ?string $nom null;
  16.     #[ORM\Column(length255)]
  17.     private ?string $prenom null;
  18.     #[ORM\Column]
  19.     private ?int $age null;
  20.     #[ORM\Column]
  21.     private ?string $numeroFixe null;
  22.     #[ORM\Column]
  23.     private ?string$numeroMobile null;
  24.     #[ORM\Column(length255)]
  25.     private ?string $lienFamilliale null;
  26.     #[ORM\Column(nullabletrue)]
  27.     private ?bool $contactPrincipale null;
  28.     #[ORM\Column(length255)]
  29.     private ?string $email null;
  30.     #[ORM\ManyToMany(targetEntityLocataires::class, mappedBy'autresContacts')]
  31.     private Collection $locataires;
  32.     public function __construct()
  33.     {
  34.         $this->locataires = new ArrayCollection();
  35.     }
  36.     public function getId(): ?int
  37.     {
  38.         return $this->id;
  39.     }
  40.     public function getNom(): ?string
  41.     {
  42.         return $this->nom;
  43.     }
  44.     public function setNom(string $nom): self
  45.     {
  46.         $this->nom $nom;
  47.         return $this;
  48.     }
  49.     public function getPrenom(): ?string
  50.     {
  51.         return $this->prenom;
  52.     }
  53.     public function setPrenom(string $prenom): self
  54.     {
  55.         $this->prenom $prenom;
  56.         return $this;
  57.     }
  58.     public function getAge(): ?int
  59.     {
  60.         return $this->age;
  61.     }
  62.     public function setAge(int $age): self
  63.     {
  64.         $this->age $age;
  65.         return $this;
  66.     }
  67.     public function getNumeroFixe(): ?string
  68.     {
  69.         return $this->numeroFixe;
  70.     }
  71.     public function setNumeroFixe(string $numeroFixe): self
  72.     {
  73.         $this->numeroFixe $numeroFixe;
  74.         return $this;
  75.     }
  76.     public function getNumeroMobile(): ?string
  77.     {
  78.         return $this->numeroMobile;
  79.     }
  80.     public function setNumeroMobile(string $numeroMobile): self
  81.     {
  82.         $this->numeroMobile $numeroMobile;
  83.         return $this;
  84.     }
  85.     public function getLienFamilliale(): ?string
  86.     {
  87.         return $this->lienFamilliale;
  88.     }
  89.     public function setLienFamilliale(string $lienFamilliale): self
  90.     {
  91.         $this->lienFamilliale $lienFamilliale;
  92.         return $this;
  93.     }
  94.     public function isContactPrincipale(): ?bool
  95.     {
  96.         return $this->contactPrincipale;
  97.     }
  98.     public function setContactPrincipale(?bool $contactPrincipale): self
  99.     {
  100.         $this->contactPrincipale $contactPrincipale;
  101.         return $this;
  102.     }
  103.     public function getEmail(): ?string
  104.     {
  105.         return $this->email;
  106.     }
  107.     public function setEmail(string $email): self
  108.     {
  109.         $this->email $email;
  110.         return $this;
  111.     }
  112.     /**
  113.      * @return Collection<int, Locataires>
  114.      */
  115.     public function getLocataires(): Collection
  116.     {
  117.         return $this->locataires;
  118.     }
  119.     public function addLocataire(Locataires $locataire): self
  120.     {
  121.         if (!$this->locataires->contains($locataire)) {
  122.             $this->locataires->add($locataire);
  123.             $locataire->addAutresContact($this);
  124.         }
  125.         return $this;
  126.     }
  127.     public function removeLocataire(Locataires $locataire): self
  128.     {
  129.         if ($this->locataires->removeElement($locataire)) {
  130.             $locataire->removeAutresContact($this);
  131.         }
  132.         return $this;
  133.     }
  134. }