diff --git a/src/Hackspace/Bundle/CalciferBundle/Entity/Location.php b/src/Hackspace/Bundle/CalciferBundle/Entity/Location.php index afd6feb..477d42f 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Entity/Location.php +++ b/src/Hackspace/Bundle/CalciferBundle/Entity/Location.php @@ -8,8 +8,13 @@ use Doctrine\ORM\Mapping as ORM; * Location * * @property string $name + * @property string $description * @property float $lon * @property float $lat + * @property string $streetaddress + * @property string $streetnumber + * @property string $zipcode; + * @property string $city * * @ORM\Table(name="locations") * @ORM\Entity @@ -23,6 +28,41 @@ class Location extends BaseEntity */ protected $name; + /** + * @var string + * + * @ORM\Column(name="description", type="text", nullable=true) + */ + protected $description; + + /** + * @var string + * + * @ORM\Column(name="streetaddress", type="string", length=255, nullable=true) + */ + protected $streetaddress; + + /** + * @var string + * + * @ORM\Column(name="streetnumber", type="string", length=255, nullable=true) + */ + protected $streetnumber; + + /** + * @var string + * + * @ORM\Column(name="zipcode", type="string", length=255, nullable=true) + */ + protected $zipcode; + + /** + * @var string + * + * @ORM\Column(name="city", type="string", length=255, nullable=true) + */ + protected $city; + /** * @var float * @@ -37,5 +77,9 @@ class Location extends BaseEntity */ protected $lat; + public function hasAddress() { + return ((strlen($this->streetaddress) > 0) && (strlen($this->city))); + } + }