<?php
/**
* Created by PhpStorm.
* User: apple
* Date: 19/05/19
* Time: 4:53 PM
*/
namespace App\AppBundle\MainBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use JsonSerializable;
/**
* AddOns
*
* @ORM\Entity
* @ORM\Table(name="pu_manage_notifications_master")
* @ORM\HasLifecycleCallbacks()
*/
class PU_ManageNotificationsMaster implements JsonSerializable
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* One product has many features. This is the inverse side.
* @ORM\OneToMany(targetEntity="PU_ManageNotificationsSub", mappedBy="pu_manage_notifications_master")
*/
private $pu_manage_notifications_sub;
/**
* Many features have one product. This is the owning side.
* @ORM\ManyToOne(targetEntity="PU_ManageNotifications", inversedBy="pu_manage_notifications_master")
* @ORM\JoinColumn(name="pu_manage_notifications_id", referencedColumnName="id")
*/
private $pu_manage_notifications;
/**
* @ORM\ManyToOne(targetEntity="WP_ManageNotificationsMaster")
* @ORM\JoinColumn(name="wp_manage_notifications_master_id", referencedColumnName="id")
*/
private $wp_manage_notifications_master;
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
/**
* @return mixed
*/
public function getPuManageNotificationsSub()
{
return $this->pu_manage_notifications_sub;
}
/**
* @param mixed $pu_manage_notifications_sub
*/
public function setPuManageNotificationsSub($pu_manage_notifications_sub)
{
$this->pu_manage_notifications_sub = $pu_manage_notifications_sub;
}
/**
* @return mixed
*/
public function getPuManageNotifications()
{
return $this->pu_manage_notifications;
}
/**
* @param mixed $pu_manage_notifications
*/
public function setPuManageNotifications($pu_manage_notifications)
{
$this->pu_manage_notifications = $pu_manage_notifications;
}
/**
* @return mixed
*/
public function getWpManageNotificationsMaster()
{
return $this->wp_manage_notifications_master;
}
/**
* @param mixed $wp_manage_notifications_master
*/
public function setWpManageNotificationsMaster($wp_manage_notifications_master)
{
$this->wp_manage_notifications_master = $wp_manage_notifications_master;
}
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->pu_manage_notifications_sub = new ArrayCollection();
$this->setCreatedAt(round(microtime(true) * 1000));
}
}