src/AppBundle/MainBundle/Entity/PU_ManageNotificationsSub.php line 124

Open in your IDE?
  1. <?php
  2. /**
  3.  * Created by PhpStorm.
  4.  * User: apple
  5.  * Date: 19/05/19
  6.  * Time: 4:55 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_sub")
  18.  * @ORM\HasLifecycleCallbacks()
  19.  */
  20. class PU_ManageNotificationsSub implements JsonSerializable
  21. {
  22.     /**
  23.      * @ORM\Column(type="integer")
  24.      * @ORM\Id
  25.      * @ORM\GeneratedValue(strategy="AUTO")
  26.      */
  27.     private $id;
  28.     /**
  29.      * Many features have one product. This is the owning side.
  30.      * @ORM\ManyToOne(targetEntity="PU_ManageNotificationsMaster", inversedBy="pu_manage_notifications_sub")
  31.      * @ORM\JoinColumn(name="manage_notifications_master_id", referencedColumnName="id")
  32.      */
  33.     private $pu_manage_notifications_master;
  34.     /**
  35.      * @ORM\ManyToOne(targetEntity="WP_ManageNotificationsSub")
  36.      * @ORM\JoinColumn(name="wp_manage_notifications_sub_id", referencedColumnName="id")
  37.      */
  38.     private $wp_manage_notifications_sub;
  39.     /**
  40.      * @ORM\Column(type="boolean", nullable=false, options={"default" : 1})
  41.      * @Assert\NotBlank()
  42.      */
  43.     private $status true;
  44.     /**
  45.      * @return mixed
  46.      */
  47.     public function getId()
  48.     {
  49.         return $this->id;
  50.     }
  51.     /**
  52.      * @return mixed
  53.      */
  54.     public function getStatus()
  55.     {
  56.         return $this->status;
  57.     }
  58.     /**
  59.      * @param mixed $status
  60.      */
  61.     public function setStatus($status)
  62.     {
  63.         $this->status $status;
  64.     }
  65.     /**
  66.      * @return mixed
  67.      */
  68.     public function getPuManageNotificationsMaster()
  69.     {
  70.         return $this->pu_manage_notifications_master;
  71.     }
  72.     /**
  73.      * @param mixed $pu_manage_notifications_master
  74.      */
  75.     public function setPuManageNotificationsMaster($pu_manage_notifications_master)
  76.     {
  77.         $this->pu_manage_notifications_master $pu_manage_notifications_master;
  78.     }
  79.     /**
  80.      * @return mixed
  81.      */
  82.     public function getWpManageNotificationsSub()
  83.     {
  84.         return $this->wp_manage_notifications_sub;
  85.     }
  86.     /**
  87.      * @param mixed $wp_manage_notifications_sub
  88.      */
  89.     public function setWpManageNotificationsSub($wp_manage_notifications_sub)
  90.     {
  91.         $this->wp_manage_notifications_sub $wp_manage_notifications_sub;
  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->setCreatedAt(round(microtime(true) * 1000));
  142.     }
  143. }