src/AppBundle/MainBundle/Entity/PU_ManageNotificationsMaster.php line 125

Open in your IDE?
  1. <?php
  2. /**
  3.  * Created by PhpStorm.
  4.  * User: apple
  5.  * Date: 19/05/19
  6.  * Time: 4:53 PM
  7.  */
  8. namespace App\AppBundle\MainBundle\Entity;
  9. use Doctrine\Common\Collections\ArrayCollection;
  10. use Doctrine\ORM\Mapping as ORM;
  11. use Symfony\Component\Validator\Constraints as Assert;
  12. use JsonSerializable;
  13. /**
  14.  * AddOns
  15.  *
  16.  * @ORM\Entity
  17.  * @ORM\Table(name="pu_manage_notifications_master")
  18.  * @ORM\HasLifecycleCallbacks()
  19.  */
  20. class PU_ManageNotificationsMaster implements JsonSerializable
  21. {
  22.     /**
  23.      * @ORM\Column(type="integer")
  24.      * @ORM\Id
  25.      * @ORM\GeneratedValue(strategy="AUTO")
  26.      */
  27.     private $id;
  28.     /**
  29.      * One product has many features. This is the inverse side.
  30.      * @ORM\OneToMany(targetEntity="PU_ManageNotificationsSub", mappedBy="pu_manage_notifications_master")
  31.      */
  32.     private $pu_manage_notifications_sub;
  33.     /**
  34.      * Many features have one product. This is the owning side.
  35.      * @ORM\ManyToOne(targetEntity="PU_ManageNotifications", inversedBy="pu_manage_notifications_master")
  36.      * @ORM\JoinColumn(name="pu_manage_notifications_id", referencedColumnName="id")
  37.      */
  38.     private $pu_manage_notifications;
  39.     /**
  40.      * @ORM\ManyToOne(targetEntity="WP_ManageNotificationsMaster")
  41.      * @ORM\JoinColumn(name="wp_manage_notifications_master_id", referencedColumnName="id")
  42.      */
  43.     private $wp_manage_notifications_master;
  44.     /**
  45.      * @return mixed
  46.      */
  47.     public function getId()
  48.     {
  49.         return $this->id;
  50.     }
  51.     /**
  52.      * @return mixed
  53.      */
  54.     public function getPuManageNotificationsSub()
  55.     {
  56.         return $this->pu_manage_notifications_sub;
  57.     }
  58.     /**
  59.      * @param mixed $pu_manage_notifications_sub
  60.      */
  61.     public function setPuManageNotificationsSub($pu_manage_notifications_sub)
  62.     {
  63.         $this->pu_manage_notifications_sub $pu_manage_notifications_sub;
  64.     }
  65.     /**
  66.      * @return mixed
  67.      */
  68.     public function getPuManageNotifications()
  69.     {
  70.         return $this->pu_manage_notifications;
  71.     }
  72.     /**
  73.      * @param mixed $pu_manage_notifications
  74.      */
  75.     public function setPuManageNotifications($pu_manage_notifications)
  76.     {
  77.         $this->pu_manage_notifications $pu_manage_notifications;
  78.     }
  79.     /**
  80.      * @return mixed
  81.      */
  82.     public function getWpManageNotificationsMaster()
  83.     {
  84.         return $this->wp_manage_notifications_master;
  85.     }
  86.     /**
  87.      * @param mixed $wp_manage_notifications_master
  88.      */
  89.     public function setWpManageNotificationsMaster($wp_manage_notifications_master)
  90.     {
  91.         $this->wp_manage_notifications_master $wp_manage_notifications_master;
  92.     }
  93.     public function jsonSerialize()
  94.     {
  95.         return array(
  96.             'id' => $this->id,
  97.         );
  98.     }
  99.     /**
  100.      * @var string $created
  101.      *
  102.      * @ORM\Column(name="created_at", type="string", nullable=false)
  103.      */
  104.     protected $createdAt;
  105.     /**
  106.      * @var string $updated
  107.      *
  108.      * @ORM\Column(name="updated_at", type="string", nullable=false)
  109.      */
  110.     protected $updatedAt;
  111.     public function getCreatedAt()
  112.     {
  113.         return $this->createdAt;
  114.     }
  115.     public function setCreatedAt($createdAt)
  116.     {
  117.         $this->createdAt $createdAt;
  118.         return $this;
  119.     }
  120.     public function getUpdatedAt()
  121.     {
  122.         return $this->updatedAt;
  123.     }
  124.     public function setUpdatedAt($updatedAt)
  125.     {
  126.         $this->updatedAt $updatedAt;
  127.         return $this;
  128.     }
  129.     /**
  130.      * @ORM\PrePersist
  131.      * @ORM\PreUpdate
  132.      */
  133.     public function updatedTimestamps()
  134.     {
  135.         $this->setUpdatedAt(round(microtime(true) * 1000));
  136.         if ($this->getCreatedAt() === null) {
  137.             $this->setCreatedAt(round(microtime(true) * 1000));
  138.         }
  139.     }
  140.     public function __construct() {
  141.         $this->pu_manage_notifications_sub = new ArrayCollection();
  142.         $this->setCreatedAt(round(microtime(true) * 1000));
  143.     }
  144. }