src/Entity/Emplacement.php line 9

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\EmplacementRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassEmplacementRepository::class)]
  6. class Emplacement
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column]
  11.     private ?int $id null;
  12.     #[ORM\Column(length100uniquetrue)]
  13.     private ?string $name null;
  14.     #[ORM\Column(length100uniquetrue)]
  15.     private ?string $slug null;
  16.     #[ORM\ManyToOne(inversedBy'emplacements'fetch'EAGER')]
  17.     #[ORM\JoinColumn(nullablefalse)]
  18.     private ?Sector $secteur null;
  19.     #[ORM\ManyToOne(inversedBy'emplacements'fetch'EAGER')]
  20.     #[ORM\JoinColumn(nullablefalse)]
  21.     private ?City $city null;
  22.     #[ORM\Column(length255)]
  23.     private ?string $address null;
  24.     #[ORM\Column(nullabletruetype"float"scale7)]
  25.     private ?float $lat null;
  26.     #[ORM\Column(nullabletruetype"float"scale7)]
  27.     private ?float $lng null;
  28.     #[ORM\Column]
  29.     private ?\DateTimeImmutable $createdAt null;
  30.     #[ORM\Column(nullabletrue)]
  31.     private ?\DateTimeImmutable $updatedAt null;
  32.     public function __toString(): string
  33.     {
  34.         return $this->getName();
  35.     }
  36.     public function getId(): ?int
  37.     {
  38.         return $this->id;
  39.     }
  40.     public function getName(): ?string
  41.     {
  42.         return $this->name;
  43.     }
  44.     public function setName(string $name): self
  45.     {
  46.         $this->name $name;
  47.         return $this;
  48.     }
  49.     public function getSlug(): ?string
  50.     {
  51.         return $this->slug;
  52.     }
  53.     public function setSlug(string $slug): self
  54.     {
  55.         $this->slug $slug;
  56.         return $this;
  57.     }
  58.     public function getSecteur(): ?Sector
  59.     {
  60.         return $this->secteur;
  61.     }
  62.     public function setSecteur(?Sector $secteur): self
  63.     {
  64.         $this->secteur $secteur;
  65.         return $this;
  66.     }
  67.     public function getCity(): ?City
  68.     {
  69.         return $this->city;
  70.     }
  71.     public function setCity(?City $city): self
  72.     {
  73.         $this->city $city;
  74.         return $this;
  75.     }
  76.     public function getAddress(): ?string
  77.     {
  78.         return $this->address;
  79.     }
  80.     public function setAddress(string $address): self
  81.     {
  82.         $this->address $address;
  83.         return $this;
  84.     }
  85.     public function getLat(): ?float
  86.     {
  87.         return $this->lat;
  88.     }
  89.     public function setLat(?float $lat): self
  90.     {
  91.         $this->lat $lat;
  92.         return $this;
  93.     }
  94.     public function getLng(): ?float
  95.     {
  96.         return $this->lng;
  97.     }
  98.     public function setLng(?float $lng): self
  99.     {
  100.         $this->lng $lng;
  101.         return $this;
  102.     }
  103.     public function getCreatedAt(): ?\DateTimeImmutable
  104.     {
  105.         return $this->createdAt;
  106.     }
  107.     public function setCreatedAt(\DateTimeImmutable $createdAt): self
  108.     {
  109.         $this->createdAt $createdAt;
  110.         return $this;
  111.     }
  112.     public function getUpdatedAt(): ?\DateTimeImmutable
  113.     {
  114.         return $this->updatedAt;
  115.     }
  116.     public function setUpdatedAt(?\DateTimeImmutable $updatedAt): self
  117.     {
  118.         $this->updatedAt $updatedAt;
  119.         return $this;
  120.     }
  121. }