src/Entity/City.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Metadata\ApiResource;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use App\Repository\CityRepository;
  6. use Symfony\Component\Serializer\Annotation\Groups;
  7. #[ORM\Entity(repositoryClassCityRepository::class)]
  8. #[ApiResource()]
  9. class City
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255)]
  16.     private ?string $departmentNumber null;
  17.     #[ORM\Column(length255)]
  18.     private ?string $departmentName null;
  19.     #[ORM\Column(length255)]
  20.     private ?string $inseeCode null;
  21.     #[ORM\Column(length255)]
  22.     #[Groups(['READ:CITY:ITEM'])]
  23.     private ?string $cityCode null;
  24.     #[ORM\Column(length255)]
  25.     private ?string $zipCode null;
  26.     #[ORM\Column(length255)]
  27.     private ?string $label null;
  28.     #[ORM\Column(length255)]
  29.     #[Groups(['READ:CITY:ITEM'])]
  30.     private ?string $latitude null;
  31.     #[ORM\Column(length255)]
  32.     #[Groups(['READ:CITY:ITEM'])]
  33.     private ?string $longitude null;
  34.     #[ORM\Column(length255)]
  35.     #[Groups(['READ:CITY:ITEM'])]
  36.     private ?string $regionName null;
  37.     #[ORM\Column(length255)]
  38.     #[Groups(['READ:CITY:ITEM'])]
  39.     private ?string $regionGeojsonName null;
  40.     public function getId(): ?int
  41.     {
  42.         return $this->id;
  43.     }
  44.     public function getDepartmentName(): ?string
  45.     {
  46.         return $this->departmentName;
  47.     }
  48.     public function setDepartmentName(string $departmentName): self
  49.     {
  50.         $this->departmentName $departmentName;
  51.         return $this;
  52.     }
  53.     public function getDepartmentNumber(): ?string
  54.     {
  55.         return $this->departmentNumber;
  56.     }
  57.     public function setDepartmentNumber(string $departmentNumber): self
  58.     {
  59.         $this->departmentNumber $departmentNumber;
  60.         return $this;
  61.     }
  62.     public function getInseeCode(): ?string
  63.     {
  64.         return $this->inseeCode;
  65.     }
  66.     public function setInseeCode(string $inseeCode): self
  67.     {
  68.         $this->inseeCode $inseeCode;
  69.         return $this;
  70.     }
  71.     public function getCityCode(): ?string
  72.     {
  73.         return $this->cityCode;
  74.     }
  75.     public function setCityCode(string $cityCode): self
  76.     {
  77.         $this->cityCode $cityCode;
  78.         return $this;
  79.     }
  80.     public function getZipCode(): ?string
  81.     {
  82.         return $this->zipCode;
  83.     }
  84.     public function setZipCode(string $zipCode): self
  85.     {
  86.         $this->zipCode $zipCode;
  87.         return $this;
  88.     }
  89.     public function getLabel(): ?string
  90.     {
  91.         return $this->label;
  92.     }
  93.     public function setLabel(string $label): self
  94.     {
  95.         $this->label $label;
  96.         return $this;
  97.     }
  98.     public function getLatitude(): ?string
  99.     {
  100.         return $this->latitude;
  101.     }
  102.     public function setLatitude(string $latitude): self
  103.     {
  104.         $this->latitude $latitude;
  105.         return $this;
  106.     }
  107.     public function getLongitude(): ?string
  108.     {
  109.         return $this->longitude;
  110.     }
  111.     public function setLongitude(string $longitude): self
  112.     {
  113.         $this->longitude $longitude;
  114.         return $this;
  115.     }
  116.     public function getRegionName(): ?string
  117.     {
  118.         return $this->regionName;
  119.     }
  120.     public function setRegionName(string $regionName): self
  121.     {
  122.         $this->regionName $regionName;
  123.         return $this;
  124.     }
  125.     public function getRegionGeojsonName(): ?string
  126.     {
  127.         return $this->regionGeojsonName;
  128.     }
  129.     public function setRegionGeojsonName(string $regionGeojsonName): self
  130.     {
  131.         $this->regionGeojsonName $regionGeojsonName;
  132.         return $this;
  133.     }
  134. }