src/Entity/Agence.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AgenceRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassAgenceRepository::class)]
  8. class Agence
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type'integer')]
  13.     private $id;
  14.     #[ORM\Column(type'string'length255nullabletrue)]
  15.     private $nom;
  16.     #[ORM\Column(type'string'length255nullabletrue)]
  17.     private $adresse;
  18.     #[ORM\Column(type'string'length255nullabletrue)]
  19.     private $boitePostale;
  20.     #[ORM\Column(type'string'length255nullabletrue)]
  21.     private $codePostal;
  22.     #[ORM\Column(type'string'length255nullabletrue)]
  23.     private $ville;
  24.     #[ORM\Column(type'string'length255nullabletrue)]
  25.     private $telephone;
  26.     #[ORM\OneToMany(targetEntityUser::class, mappedBy'agence')]
  27.     private $users;
  28.     #[ORM\Column(type'string'length255nullabletrue)]
  29.     private $siret;
  30.     #[ORM\Column(type'string'length255nullabletrue)]
  31.     private $codeAPE;
  32.     #[ORM\Column(type'string'length255nullabletrue)]
  33.     private $tvaIntracommunautaire;
  34.     public function __toString()
  35.     {
  36.         return $this->getNom();
  37.     }
  38.     public function __construct()
  39.     {
  40.         $this->users = new ArrayCollection();
  41.     }
  42.     public function getId(): ?int
  43.     {
  44.         return $this->id;
  45.     }
  46.     public function getNom(): ?string
  47.     {
  48.         return $this->nom;
  49.     }
  50.     public function setNom(?string $nom): self
  51.     {
  52.         $this->nom $nom;
  53.         return $this;
  54.     }
  55.     public function getAdresse(): ?string
  56.     {
  57.         return $this->adresse;
  58.     }
  59.     public function setAdresse(?string $adresse): self
  60.     {
  61.         $this->adresse $adresse;
  62.         return $this;
  63.     }
  64.     public function getBoitePostale(): ?string
  65.     {
  66.         return $this->boitePostale;
  67.     }
  68.     public function setBoitePostale(?string $boitePostale): self
  69.     {
  70.         $this->boitePostale $boitePostale;
  71.         return $this;
  72.     }
  73.     public function getCodePostal(): ?string
  74.     {
  75.         return $this->codePostal;
  76.     }
  77.     public function setCodePostal(?string $codePostal): self
  78.     {
  79.         $this->codePostal $codePostal;
  80.         return $this;
  81.     }
  82.     public function getVille(): ?string
  83.     {
  84.         return $this->ville;
  85.     }
  86.     public function setVille(?string $ville): self
  87.     {
  88.         $this->ville $ville;
  89.         return $this;
  90.     }
  91.     public function getTelephone(): ?string
  92.     {
  93.         return $this->telephone;
  94.     }
  95.     public function setTelephone(?string $telephone): self
  96.     {
  97.         $this->telephone $telephone;
  98.         return $this;
  99.     }
  100.     /**
  101.      * @return Collection|User[]
  102.      */
  103.     public function getUsers(): Collection
  104.     {
  105.         return $this->users;
  106.     }
  107.     public function addUser(User $user): self
  108.     {
  109.         if (!$this->users->contains($user)) {
  110.             $this->users[] = $user;
  111.             $user->setAgence($this);
  112.         }
  113.         return $this;
  114.     }
  115.     public function removeUser(User $user): self
  116.     {
  117.         if ($this->users->removeElement($user)) {
  118.             // set the owning side to null (unless already changed)
  119.             if ($user->getAgence() === $this) {
  120.                 $user->setAgence(null);
  121.             }
  122.         }
  123.         return $this;
  124.     }
  125.     public function getSiret(): ?string
  126.     {
  127.         return $this->siret;
  128.     }
  129.     public function setSiret(?string $siret): self
  130.     {
  131.         $this->siret $siret;
  132.         return $this;
  133.     }
  134.     public function getCodeAPE(): ?string
  135.     {
  136.         return $this->codeAPE;
  137.     }
  138.     public function setCodeAPE(?string $codeAPE): self
  139.     {
  140.         $this->codeAPE $codeAPE;
  141.         return $this;
  142.     }
  143.     public function getTvaIntracommunautaire(): ?string
  144.     {
  145.         return $this->tvaIntracommunautaire;
  146.     }
  147.     public function setTvaIntracommunautaire(?string $tvaIntracommunautaire): self
  148.     {
  149.         $this->tvaIntracommunautaire $tvaIntracommunautaire;
  150.         return $this;
  151.     }
  152. }