src/Entity/UserEnseignantLieu.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\UserEnseignantLieuRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=UserEnseignantLieuRepository::class)
  9.  */
  10. class UserEnseignantLieu
  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, nullable=true)
  20.      */
  21.     private $numero;
  22.     /**
  23.      * @ORM\Column(type="string", length=255, nullable=true)
  24.      */
  25.     private $rue;
  26.     /**
  27.      * @ORM\Column(type="string", length=255)
  28.      */
  29.     private $commune;
  30.     /**
  31.      * @ORM\Column(type="string", length=255)
  32.      */
  33.     private $departement;
  34.     /**
  35.      * @ORM\Column(type="string", length=255)
  36.      */
  37.     private $region;
  38.     /**
  39.      * @ORM\Column(type="integer", nullable=true)
  40.      */
  41.     private $cp;
  42.     /**
  43.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="userEnseignantLieux")
  44.      * @ORM\JoinColumn(nullable=false)
  45.      */
  46.     private $user;
  47.     /**
  48.      * @ORM\Column(type="boolean")
  49.      */
  50.     private $defaut;
  51.     /**
  52.      * @ORM\OneToMany(targetEntity=ActiviteDisponibilite::class, mappedBy="lieu")
  53.      */
  54.     private $activiteDisponibilites;
  55.     /**
  56.      * @ORM\OneToMany(targetEntity=ActiviteDisponibiliteInscription::class, mappedBy="lieu")
  57.      */
  58.     private $activiteDisponibiliteInscriptions;
  59.     public function __construct()
  60.     {
  61.         $this->activiteDisponibilites = new ArrayCollection();
  62.         $this->activiteDisponibiliteInscriptions = new ArrayCollection();
  63.     }
  64.     public function getId(): ?int
  65.     {
  66.         return $this->id;
  67.     }
  68.     public function getNumero(): ?string
  69.     {
  70.         return $this->numero;
  71.     }
  72.     public function setNumero(?string $numero): self
  73.     {
  74.         $this->numero $numero;
  75.         return $this;
  76.     }
  77.     public function getRue(): ?string
  78.     {
  79.         return $this->rue;
  80.     }
  81.     public function setRue(?string $rue): self
  82.     {
  83.         $this->rue $rue;
  84.         return $this;
  85.     }
  86.     public function getCommune(): ?string
  87.     {
  88.         return $this->commune;
  89.     }
  90.     public function setCommune(string $commune): self
  91.     {
  92.         $this->commune $commune;
  93.         return $this;
  94.     }
  95.     public function getDepartement(): ?string
  96.     {
  97.         return $this->departement;
  98.     }
  99.     public function setDepartement(string $departement): self
  100.     {
  101.         $this->departement $departement;
  102.         return $this;
  103.     }
  104.     public function getRegion(): ?string
  105.     {
  106.         return $this->region;
  107.     }
  108.     public function setRegion(string $region): self
  109.     {
  110.         $this->region $region;
  111.         return $this;
  112.     }
  113.     public function getCp(): ?int
  114.     {
  115.         return $this->cp;
  116.     }
  117.     public function setCp(?int $cp): self
  118.     {
  119.         $this->cp $cp;
  120.         return $this;
  121.     }
  122.     public function getUser(): ?User
  123.     {
  124.         return $this->user;
  125.     }
  126.     public function setUser(?User $user): self
  127.     {
  128.         $this->user $user;
  129.         return $this;
  130.     }
  131.     public function getDefaut(): ?bool
  132.     {
  133.         return $this->defaut;
  134.     }
  135.     public function setDefaut(bool $defaut): self
  136.     {
  137.         $this->defaut $defaut;
  138.         return $this;
  139.     }
  140.     /**
  141.      * @return Collection|ActiviteDisponibilite[]
  142.      */
  143.     public function getActiviteDisponibilites(): Collection
  144.     {
  145.         return $this->activiteDisponibilites;
  146.     }
  147.     public function addActiviteDisponibilite(ActiviteDisponibilite $activiteDisponibilite): self
  148.     {
  149.         if (!$this->activiteDisponibilites->contains($activiteDisponibilite)) {
  150.             $this->activiteDisponibilites[] = $activiteDisponibilite;
  151.             $activiteDisponibilite->setLieu($this);
  152.         }
  153.         return $this;
  154.     }
  155.     public function removeActiviteDisponibilite(ActiviteDisponibilite $activiteDisponibilite): self
  156.     {
  157.         if ($this->activiteDisponibilites->removeElement($activiteDisponibilite)) {
  158.             // set the owning side to null (unless already changed)
  159.             if ($activiteDisponibilite->getLieu() === $this) {
  160.                 $activiteDisponibilite->setLieu(null);
  161.             }
  162.         }
  163.         return $this;
  164.     }
  165.     /**
  166.      * @return Collection<int, ActiviteDisponibiliteInscription>
  167.      */
  168.     public function getActiviteDisponibiliteInscriptions(): Collection
  169.     {
  170.         return $this->activiteDisponibiliteInscriptions;
  171.     }
  172.     public function addActiviteDisponibiliteInscription(ActiviteDisponibiliteInscription $activiteDisponibiliteInscription): self
  173.     {
  174.         if (!$this->activiteDisponibiliteInscriptions->contains($activiteDisponibiliteInscription)) {
  175.             $this->activiteDisponibiliteInscriptions[] = $activiteDisponibiliteInscription;
  176.             $activiteDisponibiliteInscription->setLieu($this);
  177.         }
  178.         return $this;
  179.     }
  180.     public function removeActiviteDisponibiliteInscription(ActiviteDisponibiliteInscription $activiteDisponibiliteInscription): self
  181.     {
  182.         if ($this->activiteDisponibiliteInscriptions->removeElement($activiteDisponibiliteInscription)) {
  183.             // set the owning side to null (unless already changed)
  184.             if ($activiteDisponibiliteInscription->getLieu() === $this) {
  185.                 $activiteDisponibiliteInscription->setLieu(null);
  186.             }
  187.         }
  188.         return $this;
  189.     }
  190. }