src/AppBundle/AdminBundle/Entity/Admin_Access_Role_Sub.php line 209

Open in your IDE?
  1. <?php
  2. namespace App\AppBundle\AdminBundle\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. use JsonSerializable;
  7. /**
  8.  * AddOns
  9.  *
  10.  * @ORM\Entity
  11.  * @ORM\Table(name="admin_access_role_sub")
  12.  * @ORM\HasLifecycleCallbacks()
  13.  */
  14. class Admin_Access_Role_Sub implements JsonSerializable
  15. {
  16.     /**
  17.      * @ORM\Column(type="integer")
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue(strategy="AUTO")
  20.      */
  21.     private $id;
  22.     /**
  23.      * @ORM\ManyToOne(targetEntity="Admin_Access_Role_Master", inversedBy="admin_access_role_subs")
  24.      * @ORM\JoinColumn(name="admin_access_role_master_id", referencedColumnName="id")
  25.      */
  26.     private $admin_access_role_master;
  27.     /**
  28.      * @ORM\ManyToOne(targetEntity="Admin_Access_Role_Group")
  29.      * @ORM\JoinColumn(name="admin_access_role_group_id", referencedColumnName="id")
  30.      */
  31.     private $admin_access_role_group;
  32.     /**
  33.      * @ORM\ManyToOne(targetEntity="Admin_Access_Role_Group_Permission")
  34.      * @ORM\JoinColumn(name="admin_access_role_group_permission_id", referencedColumnName="id")
  35.      */
  36.     private $admin_access_role_group_permission;
  37.     /**
  38.      * @ORM\Column(type="boolean", nullable=true, options={"default" : 1})
  39.      * @Assert\NotBlank()
  40.      */
  41.     private $status;
  42.     /**
  43.      * @return mixed
  44.      */
  45.     public function getId()
  46.     {
  47.         return $this->id;
  48.     }
  49.     /**
  50.      * @return mixed
  51.      */
  52.     public function getAdminAccessRoleMaster()
  53.     {
  54.         return $this->admin_access_role_master;
  55.     }
  56.     /**
  57.      * @param mixed $admin_access_role_master
  58.      */
  59.     public function setAdminAccessRoleMaster($admin_access_role_master)
  60.     {
  61.         $this->admin_access_role_master $admin_access_role_master;
  62.     }
  63.     /**
  64.      * @return mixed
  65.      */
  66.     public function getAdminAccessRoleGroup()
  67.     {
  68.         return $this->admin_access_role_group;
  69.     }
  70.     /**
  71.      * @param mixed $admin_access_role_group
  72.      */
  73.     public function setAdminAccessRoleGroup($admin_access_role_group)
  74.     {
  75.         $this->admin_access_role_group $admin_access_role_group;
  76.     }
  77.     /**
  78.      * @return mixed
  79.      */
  80.     public function getAdminAccessRoleGroupPermission()
  81.     {
  82.         return $this->admin_access_role_group_permission;
  83.     }
  84.     /**
  85.      * @param mixed $admin_access_role_group_permission
  86.      */
  87.     public function setAdminAccessRoleGroupPermission($admin_access_role_group_permission)
  88.     {
  89.         $this->admin_access_role_group_permission $admin_access_role_group_permission;
  90.     }
  91.     /**
  92.      * @return mixed
  93.      */
  94.     public function getStatus()
  95.     {
  96.         return $this->status;
  97.     }
  98.     /**
  99.      * @param mixed $status
  100.      */
  101.     public function setStatus($status)
  102.     {
  103.         $this->status $status;
  104.     }
  105.     /**
  106.      * @var string $created
  107.      *
  108.      * @ORM\Column(name="created_at", type="string", nullable=false)
  109.      */
  110.     protected $createdAt;
  111.     /**
  112.      * @var string $updated
  113.      *
  114.      * @ORM\Column(name="updated_at", type="string", nullable=false)
  115.      */
  116.     protected $updatedAt;
  117.     public function getCreatedAt()
  118.     {
  119.         return $this->createdAt;
  120.     }
  121.     public function setCreatedAt($createdAt)
  122.     {
  123.         $this->createdAt $createdAt;
  124.         return $this;
  125.     }
  126.     public function getUpdatedAt()
  127.     {
  128.         return $this->updatedAt;
  129.     }
  130.     public function setUpdatedAt($updatedAt)
  131.     {
  132.         $this->updatedAt $updatedAt;
  133.         return $this;
  134.     }
  135.     /**
  136.      * @ORM\PrePersist
  137.      * @ORM\PreUpdate
  138.      */
  139.     public function updatedTimestamps()
  140.     {
  141.         $this->setUpdatedAt(round(microtime(true) * 1000));
  142.         if ($this->getCreatedAt() === null) {
  143.             $this->setCreatedAt(round(microtime(true) * 1000));
  144.         }
  145.     }
  146.     public function __construct() {
  147.         $this->setCreatedAt(round(microtime(true) * 1000));
  148.     }
  149.     public function jsonSerialize()
  150.     {
  151.         return array(
  152.             'id' => $this->id,
  153.             'admin_access_role_group' => $this->admin_access_role_group,
  154.             'admin_access_role_group_permission' => $this->admin_access_role_group_permission,
  155.             'status' => $this->status
  156.         );
  157.     }
  158. }