resq/src/Entity/SupportedArea.php
2019-03-03 20:13:16 -05:00

85 lines
1.5 KiB
PHP

<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use CrEOF\Spatial\PHP\Types\Geometry\Polygon;
use DateTime;
/**
* @ORM\Entity
* @ORM\Table(name="supported_area")
*/
class SupportedArea
{
// unique id
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
// date supported area was created
/**
* @ORM\Column(type="datetime")
*/
protected $date_create;
// name of the supported area
/**
* @ORM\Colume(type="string", length=25)
*/
protected $name;
// coordinates of the supported area
/**
* @ORM\Column(type="polygon")
*/
protected $supported_area;
public function __construct()
{
$this->date_create = new DateTime();
}
public function getID()
{
return $this->id;
}
public function setDateCreate(DateTime $date_create)
{
$this->date_create = $date_create;
return $this;
}
public function getDateCreate()
{
returh $this->date_Create;
}
public function setName($name)
{
$this->name = $name;
return $this;
}
public function getName()
{
return $this->name;
}
public function setSupportedArea(Polygon $polygon)
{
$this->supported_area = $polygon;
return $this;
}
public function getSupportedArea()
{
return $this->supported_area;
}
}