Create entity file for supported areas
This commit is contained in:
parent
61d4ad0764
commit
87a8770bb4
1 changed files with 85 additions and 0 deletions
85
src/Entity/SupportedArea.php
Normal file
85
src/Entity/SupportedArea.php
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
<?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;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue