Add coord_long and coord_lat fields to JobOrder entity #186

This commit is contained in:
Kendrick Chan 2019-02-21 14:40:17 +08:00
parent 55d9fb329f
commit bc8d01dc6a

View file

@ -64,6 +64,18 @@ class JobOrder
*/
protected $coordinates;
// we split up coordinates into long / lat for reports purposes
/**
* @ORM\Column(type="decimal", precision=11, scale=8)
*/
protected $coord_long;
// we split up coordinates into long / lat for reports purposes
/**
* @ORM\Column(type="decimal", precision=11, scale=8)
*/
protected $coord_lat;
// is it an advanced order (future date)
/**
* @ORM\Column(type="boolean")
@ -350,6 +362,9 @@ class JobOrder
public function setCoordinates(Point $point)
{
$this->coordinates = $point;
$this->coord_lat = $point->getLatitude();
$this->coord_long = $point->getLongitude();
return $this;
}