From 6edbed9dfe0a8296949d07a04b333702db2eb5bc Mon Sep 17 00:00:00 2001 From: Brabli <67018167+Brabli@users.noreply.github.com> Date: Mon, 17 Oct 2022 12:21:35 +0100 Subject: [PATCH] Add attributes above lat long properties --- src/Entity/Trait/MappableTrait.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Entity/Trait/MappableTrait.php b/src/Entity/Trait/MappableTrait.php index 4a1d59c..89c3b65 100644 --- a/src/Entity/Trait/MappableTrait.php +++ b/src/Entity/Trait/MappableTrait.php @@ -4,6 +4,8 @@ declare(strict_types=1); namespace Pcm\GeocodeBundle\Entity\Trait; +use Doctrine\ORM\Mapping as ORM; + /** * Allows an entity to be mapped via latitude and longitude coordinates * @@ -13,8 +15,10 @@ namespace Pcm\GeocodeBundle\Entity\Trait; */ trait MappableTrait { + #[ORM\Column(type: 'decimal', precision: 10, scale: 6, nullable: true)] private ?float $latitude = null; + #[ORM\Column(type: 'decimal', precision: 10, scale: 6, nullable: true)] private ?float $longitude = null; public function getLatitude(): ?float