src/Entity/Location/MapCoordinate.php line 13

Open in your IDE?
  1. <?php
  2. /**
  3.  * Created by simpson <simpsonwork@gmail.com>
  4.  * Date: 2019-03-19
  5.  * Time: 15:42
  6.  */
  7. namespace App\Entity\Location;
  8. use Doctrine\ORM\Mapping as ORM;
  9. #[ORM\Embeddable]
  10. final class MapCoordinate
  11. {
  12.     #[ORM\Column(name: 'map_latitude', type: 'decimal', precision: 15, scale: 12, nullable: true)]
  13.     protected ?float $latitude;
  14.     #[ORM\Column(name: 'map_longitude', type: 'decimal', precision: 15, scale: 12, nullable: true)]
  15.     protected ?float $longitude;
  16.     public function __construct(?float $latitude, ?float $longitude)
  17.     {
  18.         $this->latitude = $latitude;
  19.         $this->longitude = $longitude;
  20.     }
  21.     public function getLatitude(): ?float
  22.     {
  23.         return $this->latitude;
  24.     }
  25.     public function getLongitude(): ?float
  26.     {
  27.         return $this->longitude;
  28.     }
  29. }