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=255)
  20.      */
  21.     private $lot;
  22.     /**
  23.      * @ORM\ManyToOne(targetEntity=Quartier::class, inversedBy="adresses")
  24.      */
  25.     private $quartier;
  26.     /**
  27.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="adresses")
  28.      */
  29.     private $patient;
  30.     /**
  31.      * @ORM\Column(type="string", length=255)
  32.      */
  33.     private $titre;
  34.     /**
  35.      * @ORM\OneToOne(targetEntity=IctusPharmacie::class, cascade={"persist", "remove"})
  36.      */
  37.     private $ictusPharmacie;
  38.      /**
  39.      * @ORM\Column(type="float", nullable=true)
  40.      */
  41.     private $longitude;
  42.     /**
  43.      * @ORM\Column(type="float", nullable=true)
  44.      */
  45.     private $latitude;
  46.     /**
  47.      * @ORM\OneToMany(targetEntity=Parcours::class, mappedBy="adresse")
  48.      */
  49.     private $parcours;
  50.     /**
  51.      * @ORM\OneToMany(targetEntity=IctusCommande::class, mappedBy="adressePatient")
  52.      */
  53.     private $ictusCommandes;
  54.     public function __construct()
  55.     {
  56.         $this->parcours = new ArrayCollection();
  57.         $this->ictusCommandes = new ArrayCollection();
  58.     }
  59.    
  60.     public function getId(): ?int
  61.     {
  62.         return $this->id;
  63.     }
  64.     public function getLot(): ?string
  65.     {
  66.         return $this->lot;
  67.     }
  68.     public function setLot(string $lot): self
  69.     {
  70.         $this->lot $lot;
  71.         return $this;
  72.     }
  73.     public function getQuartier(): ?Quartier
  74.     {
  75.         return $this->quartier;
  76.     }
  77.     public function setQuartier(?Quartier $quartier): self
  78.     {
  79.         $this->quartier $quartier;
  80.         return $this;
  81.     }
  82.     public function getPatient(): ?User
  83.     {
  84.         return $this->patient;
  85.     }
  86.     public function setPatient(?User $patient): self
  87.     {
  88.         $this->patient $patient;
  89.         return $this;
  90.     }
  91.     public function getTitre(): ?string
  92.     {
  93.         return $this->titre;
  94.     }
  95.     public function setTitre(string $titre): self
  96.     {
  97.         $this->titre $titre;
  98.         return $this;
  99.     }
  100.     public function getIctusPharmacie(): ?IctusPharmacie
  101.     {
  102.         return $this->ictusPharmacie;
  103.     }
  104.     public function setIctusPharmacie(?IctusPharmacie $ictusPharmacie): self
  105.     {
  106.         $this->ictusPharmacie $ictusPharmacie;
  107.         return $this;
  108.     }
  109.     public function getLatitude(): ?float
  110.     {
  111.         return $this->latitude;
  112.     }
  113.     public function setLatitude(?float $latitude): self
  114.     {
  115.         $this->latitude $latitude;
  116.         return $this;
  117.     }
  118.     public function getLongitude(): ?float
  119.     {
  120.         return $this->longitude;
  121.     }
  122.     public function setLongitude(?float $longitude): self
  123.     {
  124.         $this->longitude $longitude;
  125.         return $this;
  126.     }
  127.     /**
  128.      * @return Collection<int, Parcours>
  129.      */
  130.     public function getParcours(): Collection
  131.     {
  132.         return $this->parcours;
  133.     }
  134.     public function addParcour(Parcours $parcour): self
  135.     {
  136.         if (!$this->parcours->contains($parcour)) {
  137.             $this->parcours[] = $parcour;
  138.             $parcour->setAdresse($this);
  139.         }
  140.         return $this;
  141.     }
  142.     public function removeParcour(Parcours $parcour): self
  143.     {
  144.         if ($this->parcours->removeElement($parcour)) {
  145.             // set the owning side to null (unless already changed)
  146.             if ($parcour->getAdresse() === $this) {
  147.                 $parcour->setAdresse(null);
  148.             }
  149.         }
  150.         return $this;
  151.     }
  152.     /**
  153.      * @return Collection<int, IctusCommande>
  154.      */
  155.     public function getIctusCommandes(): Collection
  156.     {
  157.         return $this->ictusCommandes;
  158.     }
  159.     public function addIctusCommande(IctusCommande $ictusCommande): self
  160.     {
  161.         if (!$this->ictusCommandes->contains($ictusCommande)) {
  162.             $this->ictusCommandes[] = $ictusCommande;
  163.             $ictusCommande->setAdressePatient($this);
  164.         }
  165.         return $this;
  166.     }
  167.     public function removeIctusCommande(IctusCommande $ictusCommande): self
  168.     {
  169.         if ($this->ictusCommandes->removeElement($ictusCommande)) {
  170.             // set the owning side to null (unless already changed)
  171.             if ($ictusCommande->getAdressePatient() === $this) {
  172.                 $ictusCommande->setAdressePatient(null);
  173.             }
  174.         }
  175.         return $this;
  176.     }
  177. }