<?phpnamespace App\Entity;use App\Repository\AdresseRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=AdresseRepository::class) */class Adresse{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=50, nullable=true) */ private $adr_coordonnees; /** * @ORM\Column(type="string", length=10) */ private $adr_code_postal; /** * @ORM\Column(type="string", length=100) */ private $adr_rue; /** * @ORM\Column(type="string", length=50) */ private $adr_ville; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $adr_complement; /** * @ORM\OneToMany(targetEntity=ClientCompte::class, mappedBy="adresse") */ private $clientComptes; public function __construct() { $this->clientComptes = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getAdrCoordonnees(): ?string { return $this->adr_coordonnees; } public function setAdrCoordonnees(?string $adr_coordonnees): self { $this->adr_coordonnees = $adr_coordonnees; return $this; } public function getAdrCodePostal(): ?string { return $this->adr_code_postal; } public function setAdrCodePostal(string $adr_code_postal): self { $this->adr_code_postal = $adr_code_postal; return $this; } public function getAdrRue(): ?string { return $this->adr_rue; } public function setAdrRue(string $adr_rue): self { $this->adr_rue = $adr_rue; return $this; } public function getAdrVille(): ?string { return $this->adr_ville; } public function setAdrVille(string $adr_ville): self { $this->adr_ville = $adr_ville; return $this; } public function getAdrComplement(): ?string { return $this->adr_complement; } public function setAdrComplement(?string $adr_complement): self { $this->adr_complement = $adr_complement; return $this; } /** * @return Collection<int, ClientCompte> */ public function getClientComptes(): Collection { return $this->clientComptes; } public function addClientCompte(ClientCompte $clientCompte): self { if (!$this->clientComptes->contains($clientCompte)) { $this->clientComptes[] = $clientCompte; $clientCompte->setAdresse($this); } return $this; } public function removeClientCompte(ClientCompte $clientCompte): self { if ($this->clientComptes->removeElement($clientCompte)) { // set the owning side to null (unless already changed) if ($clientCompte->getAdresse() === $this) { $clientCompte->setAdresse(null); } } return $this; }}