src/Entity/Adresse.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AdresseRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=AdresseRepository::class)
  9.  */
  10. class Adresse
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=50, nullable=true)
  20.      */
  21.     private $adr_coordonnees;
  22.     /**
  23.      * @ORM\Column(type="string", length=10)
  24.      */
  25.     private $adr_code_postal;
  26.     /**
  27.      * @ORM\Column(type="string", length=100)
  28.      */
  29.     private $adr_rue;
  30.     /**
  31.      * @ORM\Column(type="string", length=50)
  32.      */
  33.     private $adr_ville;
  34.     /**
  35.      * @ORM\Column(type="string", length=255, nullable=true)
  36.      */
  37.     private $adr_complement;
  38.     /**
  39.      * @ORM\OneToMany(targetEntity=ClientCompte::class, mappedBy="adresse")
  40.      */
  41.     private $clientComptes;
  42.     public function __construct()
  43.     {
  44.         $this->clientComptes = new ArrayCollection();
  45.     }
  46.     public function getId(): ?int
  47.     {
  48.         return $this->id;
  49.     }
  50.     public function getAdrCoordonnees(): ?string
  51.     {
  52.         return $this->adr_coordonnees;
  53.     }
  54.     public function setAdrCoordonnees(?string $adr_coordonnees): self
  55.     {
  56.         $this->adr_coordonnees $adr_coordonnees;
  57.         return $this;
  58.     }
  59.     public function getAdrCodePostal(): ?string
  60.     {
  61.         return $this->adr_code_postal;
  62.     }
  63.     public function setAdrCodePostal(string $adr_code_postal): self
  64.     {
  65.         $this->adr_code_postal $adr_code_postal;
  66.         return $this;
  67.     }
  68.     public function getAdrRue(): ?string
  69.     {
  70.         return $this->adr_rue;
  71.     }
  72.     public function setAdrRue(string $adr_rue): self
  73.     {
  74.         $this->adr_rue $adr_rue;
  75.         return $this;
  76.     }
  77.     public function getAdrVille(): ?string
  78.     {
  79.         return $this->adr_ville;
  80.     }
  81.     public function setAdrVille(string $adr_ville): self
  82.     {
  83.         $this->adr_ville $adr_ville;
  84.         return $this;
  85.     }
  86.     public function getAdrComplement(): ?string
  87.     {
  88.         return $this->adr_complement;
  89.     }
  90.     public function setAdrComplement(?string $adr_complement): self
  91.     {
  92.         $this->adr_complement $adr_complement;
  93.         return $this;
  94.     }
  95.     /**
  96.      * @return Collection<int, ClientCompte>
  97.      */
  98.     public function getClientComptes(): Collection
  99.     {
  100.         return $this->clientComptes;
  101.     }
  102.     public function addClientCompte(ClientCompte $clientCompte): self
  103.     {
  104.         if (!$this->clientComptes->contains($clientCompte)) {
  105.             $this->clientComptes[] = $clientCompte;
  106.             $clientCompte->setAdresse($this);
  107.         }
  108.         return $this;
  109.     }
  110.     public function removeClientCompte(ClientCompte $clientCompte): self
  111.     {
  112.         if ($this->clientComptes->removeElement($clientCompte)) {
  113.             // set the owning side to null (unless already changed)
  114.             if ($clientCompte->getAdresse() === $this) {
  115.                 $clientCompte->setAdresse(null);
  116.             }
  117.         }
  118.         return $this;
  119.     }
  120. }