<?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_loc_detail_amenities")
* @ORM\HasLifecycleCallbacks()
*/
class PS_Add_Spot_Loc_Detail_Amenities implements JsonSerializable
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* Many features have one product. This is the owning side.
* @ORM\ManyToOne(targetEntity="Ps_Add_Spot_Loc_Detail", inversedBy="ps_add_spot_loc_detail_amenities")
* @ORM\JoinColumn(name="ps_add_spot_loc_detail_id", referencedColumnName="id")
*/
private $ps_add_spot_loc_detail;
/**
* @ORM\ManyToOne(targetEntity="WP_Amenities")
* @ORM\JoinColumn(name="wp_amenities_id", referencedColumnName="id")
*/
private $wp_amenities;
/**
* @ORM\Column(type="boolean", nullable=false)
* @Assert\NotBlank()
*/
private $status;
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
/**
* @return mixed
*/
public function getPsAddSpotLocDetail()
{
return $this->ps_add_spot_loc_detail;
}
/**
* @param mixed $ps_add_spot_loc_detail
*/
public function setPsAddSpotLocDetail($ps_add_spot_loc_detail)
{
$this->ps_add_spot_loc_detail = $ps_add_spot_loc_detail;
}
/**
* @return mixed
*/
public function getWpAmenities()
{
return $this->wp_amenities;
}
/**
* @param mixed $wp_amenities
*/
public function setWpAmenities($wp_amenities)
{
$this->wp_amenities = $wp_amenities;
}
/**
* @return mixed
*/
public function getStatus()
{
return $this->status;
}
/**
* @param mixed $status
*/
public function setStatus($status)
{
$this->status = $status;
}
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));
}
}