Compare commits

...

2 Commits
0.0.4 ... 0.0.5

Author SHA1 Message Date
Brabli
6edbed9dfe Add attributes above lat long properties 2022-10-17 12:21:35 +01:00
Brabli
3c23d5e88d Require doctrine orm 2022-10-17 12:21:07 +01:00
2 changed files with 6 additions and 1 deletions

View File

@@ -18,7 +18,8 @@
"symfony/http-client": "^6.1", "symfony/http-client": "^6.1",
"symfony/dependency-injection": "^6.1", "symfony/dependency-injection": "^6.1",
"symfony/framework-bundle": "^6.1", "symfony/framework-bundle": "^6.1",
"symfony/yaml": "^6.1" "symfony/yaml": "^6.1",
"doctrine/orm": "^2.13"
}, },
"require-dev": { "require-dev": {

View File

@@ -4,6 +4,8 @@ declare(strict_types=1);
namespace Pcm\GeocodeBundle\Entity\Trait; namespace Pcm\GeocodeBundle\Entity\Trait;
use Doctrine\ORM\Mapping as ORM;
/** /**
* Allows an entity to be mapped via latitude and longitude coordinates * Allows an entity to be mapped via latitude and longitude coordinates
* *
@@ -13,8 +15,10 @@ namespace Pcm\GeocodeBundle\Entity\Trait;
*/ */
trait MappableTrait trait MappableTrait
{ {
#[ORM\Column(type: 'decimal', precision: 10, scale: 6, nullable: true)]
private ?float $latitude = null; private ?float $latitude = null;
#[ORM\Column(type: 'decimal', precision: 10, scale: 6, nullable: true)]
private ?float $longitude = null; private ?float $longitude = null;
public function getLatitude(): ?float public function getLatitude(): ?float