src/Entity/VilleFrance.php line 10

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\VilleFranceRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassVilleFranceRepository::class)]
  6. #[ORM\Table(name:"ville_france.villes_france_free")]
  7. class VilleFrance
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\Column(length3)]
  14.     private ?string $villeDepartement null;
  15.     #[ORM\Column(length45)]
  16.     private ?string $villeNomReel null;
  17.     #[ORM\Column(length255)]
  18.     private ?string $villeCodePostal null;
  19.     #[ORM\Column(length255)]
  20.     private ?string $villeNomSimple null;
  21.     const VILLE_LINGEVRES 4976;
  22.     const VILLE_VIRE 4708;
  23.     public function getId(): ?int
  24.     {
  25.         return $this->id;
  26.     }
  27.     public function getVilleDepartement(): ?string
  28.     {
  29.         return $this->villeDepartement;
  30.     }
  31.     public function setVilleDepartement(string $villeDepartement): self
  32.     {
  33.         $this->villeDepartement $villeDepartement;
  34.         return $this;
  35.     }
  36.     public function getVilleNomReel(): ?string
  37.     {
  38.         return $this->villeNomReel;
  39.     }
  40.     public function setVilleNomReel(string $villeNomReel): self
  41.     {
  42.         $this->villeNomReel $villeNomReel;
  43.         return $this;
  44.     }
  45.     public function getVilleCodePostal(): ?string
  46.     {
  47.         return $this->villeCodePostal;
  48.     }
  49.     public function setVilleCodePostal(string $villeCodePostal): self
  50.     {
  51.         $this->villeCodePostal $villeCodePostal;
  52.         return $this;
  53.     }
  54.     public function getVilleNomSimple(): ?string
  55.     {
  56.         return $this->villeNomSimple;
  57.     }
  58.     public function setVilleNomSimple(string $villeNomSimple): self
  59.     {
  60.         $this->villeNomSimple $villeNomSimple;
  61.         return $this;
  62.     }
  63.     public function __toString()
  64.     {
  65.         return $this->getVilleNomReel().' '.$this->getVilleCodePostal();
  66.     }
  67. }