<?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_photos")
* @ORM\HasLifecycleCallbacks()
*/
class PS_Add_Spot_Photos 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="string", nullable=true)
* @Assert\NotBlank()
*/
private $name;
/**
* @ORM\Column(type="string", nullable=true)
* @Assert\NotBlank()
*/
private $caption;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Assert\NotBlank()
*/
private $active;
/**
* @ORM\Column(type="integer", nullable=true)
* @Assert\NotBlank()
*/
private $seq_number;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Assert\NotBlank()
*/
private $is_completed;
/**
* Many features have one product. This is the owning side.
* @ORM\ManyToOne(targetEntity="PS_Add_Spot", inversedBy="ps_add_spot_photos")
* @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 getName()
{
return $this->name;
}
/**
* @param mixed $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return mixed
*/
public function getUrl()
{
return $this->url;
}
/**
* @param mixed $url
*/
public function setUrl($url)
{
$this->url = $url;
}
/**
* @return mixed
*/
public function getCaption()
{
return $this->caption;
}
/**
* @param mixed $caption
*/
public function setCaption($caption)
{
$this->caption = $caption;
}
/**
* @return mixed
*/
public function getActive()
{
return $this->active;
}
/**
* @param mixed $active
*/
public function setActive($active)
{
$this->active = $active;
}
/**
* @return mixed
*/
public function getSeqNumber()
{
return $this->seq_number;
}
/**
* @param mixed $seq_number
*/
public function setSeqNumber($seq_number)
{
$this->seq_number = $seq_number;
}
/**
* @return mixed
*/
public function getisCompleted()
{
return $this->is_completed;
}
/**
* @param mixed $is_completed
*/
public function setIsCompleted($is_completed)
{
$this->is_completed = $is_completed;
}
/**
* @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;
}
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));
}
}