<?php
/**
* Created by PhpStorm.
* User: apple
* Date: 29/03/19
* Time: 3:08 PM
*/
namespace App\AppBundle\MainBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use JsonSerializable;
/**
* AddOns
*
* @ORM\Entity
* @ORM\Table(name="ps_add_spot_street_view")
* @ORM\HasLifecycleCallbacks()
*/
class PS_Add_Spot_Street_View implements JsonSerializable
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="string", nullable=true)
* @Assert\NotBlank()
*/
private $url;
/**
* @ORM\Column(type="decimal", precision=11, scale=8, nullable=true)
* @Assert\NotBlank()
*/
private $latitude;
/**
* @ORM\Column(type="decimal", precision=11, scale=8, nullable=true)
* @Assert\NotBlank()
*/
private $longitude;
/**
* @ORM\Column(type="string", nullable=true)
* @Assert\NotBlank()
*/
private $direction;
/**
* @ORM\Column(type="string", nullable=true)
* @Assert\NotBlank()
*/
private $heading;
/**
* @ORM\Column(type="string", nullable=true)
* @Assert\NotBlank()
*/
private $pitch;
/**
* @ORM\Column(type="string", nullable=true)
* @Assert\NotBlank()
*/
private $zoom;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
* @Assert\NotBlank()
*/
private $is_available;
/**
* One Cart has One Customer.
* @ORM\OneToOne(targetEntity="PS_Add_Spot", inversedBy="ps_add_spot_street_view")
* @ORM\JoinColumn(name="ps_add_spot_id", referencedColumnName="id")
*/
private $ps_add_spot;
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
/**
* @return mixed
*/
public function getUrl()
{
return $this->url;
}
/**
* @param mixed $url
*/
public function setUrl($url)
{
$this->url = $url;
}
/**
* @return mixed
*/
public function getLatitude()
{
return $this->latitude;
}
/**
* @param mixed $latitude
*/
public function setLatitude($latitude)
{
$this->latitude = $latitude;
}
/**
* @return mixed
*/
public function getLongitude()
{
return $this->longitude;
}
/**
* @param mixed $longitude
*/
public function setLongitude($longitude)
{
$this->longitude = $longitude;
}
/**
* @return mixed
*/
public function getDirection()
{
return $this->direction;
}
/**
* @param mixed $direction
*/
public function setDirection($direction)
{
$this->direction = $direction;
}
/**
* @return mixed
*/
public function getHeading()
{
return $this->heading;
}
/**
* @param mixed $heading
*/
public function setHeading($heading)
{
$this->heading = $heading;
}
/**
* @return mixed
*/
public function getPitch()
{
return $this->pitch;
}
/**
* @param mixed $pitch
*/
public function setPitch($pitch)
{
$this->pitch = $pitch;
}
/**
* @return mixed
*/
public function getZoom()
{
return $this->zoom;
}
/**
* @param mixed $zoom
*/
public function setZoom($zoom)
{
$this->zoom = $zoom;
}
/**
* @return mixed
*/
public function getPsAddSpot()
{
return $this->ps_add_spot;
}
/**
* @param mixed $ps_add_spot
*/
public function setPsAddSpot($ps_add_spot)
{
$this->ps_add_spot = $ps_add_spot;
}
/**
* @return mixed
*/
public function getIsAvailable()
{
return $this->is_available;
}
/**
* @param mixed $is_available
*/
public function setIsAvailable($is_available)
{
$this->is_available = $is_available;
}
public function jsonSerialize()
{
return array(
'id' => $this->id,
);
}
/**
* @var string $created
*
* @ORM\Column(name="created_at", type="string", nullable=false)
*/
protected $createdAt;
/**
* @var string $updated
*
* @ORM\Column(name="updated_at", type="string", nullable=false)
*/
protected $updatedAt;
public function getCreatedAt()
{
return $this->createdAt;
}
public function setCreatedAt($createdAt)
{
$this->createdAt = $createdAt;
return $this;
}
public function getUpdatedAt()
{
return $this->updatedAt;
}
public function setUpdatedAt($updatedAt)
{
$this->updatedAt = $updatedAt;
return $this;
}
/**
* @ORM\PrePersist
* @ORM\PreUpdate
*/
public function updatedTimestamps()
{
$this->setUpdatedAt(round(microtime(true) * 1000));
if ($this->getCreatedAt() === null) {
$this->setCreatedAt(round(microtime(true) * 1000));
}
}
public function __construct() {
$this->setCreatedAt(round(microtime(true) * 1000));
}
}