<?phpnamespace App\Entity;use App\Repository\AutresContactsRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: AutresContactsRepository::class)]class AutresContacts{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 255)] private ?string $nom = null; #[ORM\Column(length: 255)] private ?string $prenom = null; #[ORM\Column] private ?int $age = null; #[ORM\Column] private ?string $numeroFixe = null; #[ORM\Column] private ?string$numeroMobile = null; #[ORM\Column(length: 255)] private ?string $lienFamilliale = null; #[ORM\Column(nullable: true)] private ?bool $contactPrincipale = null; #[ORM\Column(length: 255)] private ?string $email = null; #[ORM\ManyToMany(targetEntity: Locataires::class, mappedBy: 'autresContacts')] private Collection $locataires; public function __construct() { $this->locataires = 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 getAge(): ?int { return $this->age; } public function setAge(int $age): self { $this->age = $age; return $this; } public function getNumeroFixe(): ?string { return $this->numeroFixe; } public function setNumeroFixe(string $numeroFixe): self { $this->numeroFixe = $numeroFixe; return $this; } public function getNumeroMobile(): ?string { return $this->numeroMobile; } public function setNumeroMobile(string $numeroMobile): self { $this->numeroMobile = $numeroMobile; return $this; } public function getLienFamilliale(): ?string { return $this->lienFamilliale; } public function setLienFamilliale(string $lienFamilliale): self { $this->lienFamilliale = $lienFamilliale; return $this; } public function isContactPrincipale(): ?bool { return $this->contactPrincipale; } public function setContactPrincipale(?bool $contactPrincipale): self { $this->contactPrincipale = $contactPrincipale; return $this; } public function getEmail(): ?string { return $this->email; } public function setEmail(string $email): self { $this->email = $email; return $this; } /** * @return Collection<int, Locataires> */ public function getLocataires(): Collection { return $this->locataires; } public function addLocataire(Locataires $locataire): self { if (!$this->locataires->contains($locataire)) { $this->locataires->add($locataire); $locataire->addAutresContact($this); } return $this; } public function removeLocataire(Locataires $locataire): self { if ($this->locataires->removeElement($locataire)) { $locataire->removeAutresContact($this); } return $this; }}