src/Entity/Emplacement.php line 9
<?php
namespace App\Entity;
use App\Repository\EmplacementRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: EmplacementRepository::class)]
class Emplacement
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 100, unique: true)]
private ?string $name = null;
#[ORM\Column(length: 100, unique: true)]
private ?string $slug = null;
#[ORM\ManyToOne(inversedBy: 'emplacements', fetch: 'EAGER')]
#[ORM\JoinColumn(nullable: false)]
private ?Sector $secteur = null;
#[ORM\ManyToOne(inversedBy: 'emplacements', fetch: 'EAGER')]
#[ORM\JoinColumn(nullable: false)]
private ?City $city = null;
#[ORM\Column(length: 255)]
private ?string $address = null;
#[ORM\Column(nullable: true, type: "float", scale: 7)]
private ?float $lat = null;
#[ORM\Column(nullable: true, type: "float", scale: 7)]
private ?float $lng = null;
#[ORM\Column]
private ?\DateTimeImmutable $createdAt = null;
#[ORM\Column(nullable: true)]
private ?\DateTimeImmutable $updatedAt = null;
public function __toString(): string
{
return $this->getName();
}
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getSlug(): ?string
{
return $this->slug;
}
public function setSlug(string $slug): self
{
$this->slug = $slug;
return $this;
}
public function getSecteur(): ?Sector
{
return $this->secteur;
}
public function setSecteur(?Sector $secteur): self
{
$this->secteur = $secteur;
return $this;
}
public function getCity(): ?City
{
return $this->city;
}
public function setCity(?City $city): self
{
$this->city = $city;
return $this;
}
public function getAddress(): ?string
{
return $this->address;
}
public function setAddress(string $address): self
{
$this->address = $address;
return $this;
}
public function getLat(): ?float
{
return $this->lat;
}
public function setLat(?float $lat): self
{
$this->lat = $lat;
return $this;
}
public function getLng(): ?float
{
return $this->lng;
}
public function setLng(?float $lng): self
{
$this->lng = $lng;
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeImmutable $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getUpdatedAt(): ?\DateTimeImmutable
{
return $this->updatedAt;
}
public function setUpdatedAt(?\DateTimeImmutable $updatedAt): self
{
$this->updatedAt = $updatedAt;
return $this;
}
}