Introduced a BaseEntity for more easy access to all the properties.
This commit is contained in:
parent
e3ca015608
commit
12e7dafe0d
5 changed files with 97 additions and 372 deletions
|
@ -10,138 +10,28 @@ use Doctrine\ORM\Mapping as ORM;
|
|||
* @ORM\Table(name="locations")
|
||||
* @ORM\Entity
|
||||
*/
|
||||
class Location
|
||||
class Location extends BaseEntity
|
||||
{
|
||||
/**
|
||||
* @var integer
|
||||
*
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="name", type="string", length=255)
|
||||
*/
|
||||
private $name;
|
||||
protected $name;
|
||||
|
||||
/**
|
||||
* @var float
|
||||
*
|
||||
* @ORM\Column(name="lon", type="float", nullable=true)
|
||||
*/
|
||||
private $lon;
|
||||
protected $lon;
|
||||
|
||||
/**
|
||||
* @var float
|
||||
*
|
||||
* @ORM\Column(name="lat", type="float", nullable=true)
|
||||
*/
|
||||
private $lat;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="slug", type="string", length=255,options={"default" = ""})
|
||||
*/
|
||||
private $slug = '';
|
||||
|
||||
/**
|
||||
* @param string $slug
|
||||
*/
|
||||
public function setSlug($slug)
|
||||
{
|
||||
$this->slug = $slug;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getSlug()
|
||||
{
|
||||
return $this->slug;
|
||||
}
|
||||
protected $lat;
|
||||
|
||||
|
||||
/**
|
||||
* Get id
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set name
|
||||
*
|
||||
* @param string $name
|
||||
* @return Location
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->name = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set lon
|
||||
*
|
||||
* @param float $lon
|
||||
* @return Location
|
||||
*/
|
||||
public function setLon($lon)
|
||||
{
|
||||
$this->lon = $lon;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get lon
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getLon()
|
||||
{
|
||||
return $this->lon;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set lat
|
||||
*
|
||||
* @param float $lat
|
||||
* @return Location
|
||||
*/
|
||||
public function setLat($lat)
|
||||
{
|
||||
$this->lat = $lat;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get lat
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getLat()
|
||||
{
|
||||
return $this->lat;
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue