<?php
namespace App\AppBundle\AdminBundle\Entity;
use App\AppBundle\MainBundle\Constants\AdminRoleConstant;
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="admin_roles")
* @ORM\HasLifecycleCallbacks()
*/
class Admin_Roles implements JsonSerializable
{
const ROLES = [
AdminRoleConstant::ROLE_READ => AdminRoleConstant::ROLE_READ,
AdminRoleConstant::ROLE_WRITE => AdminRoleConstant::ROLE_WRITE,
AdminRoleConstant::ROLE_DELETE => AdminRoleConstant::ROLE_DELETE,
AdminRoleConstant::ROLE_NO_ACCESS => AdminRoleConstant::ROLE_NO_ACCESS,
AdminRoleConstant::ROLE_OWNER => AdminRoleConstant::ROLE_OWNER,
];
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var Admin_User
* @ORM\OneToOne(targetEntity="Admin_User", inversedBy="admin_roles")
* @ORM\JoinColumn(name="admin_user_id", referencedColumnName="id")
*/
private $admin_user;
/**
* @var string
* @ORM\Column(type="string", nullable=false)
* @Assert\NotBlank()
*/
private $module_dashboard = AdminRoleConstant::ROLE_NO_ACCESS;
/**
* @var string
* @ORM\Column(type="string", nullable=false)
* @Assert\NotBlank()
*/
private $module_user = AdminRoleConstant::ROLE_NO_ACCESS;
/**
* @var string
* @ORM\Column(type="string", nullable=false)
* @Assert\NotBlank()
*/
private $module_user_details = AdminRoleConstant::ROLE_NO_ACCESS;
/**
* @var string
* @ORM\Column(type="string", nullable=false)
* @Assert\NotBlank()
*/
private $module_parking_spot = AdminRoleConstant::ROLE_NO_ACCESS;
/**
* @var string
* @ORM\Column(type="string", nullable=false)
* @Assert\NotBlank()
*/
private $module_parking_spot_details = AdminRoleConstant::ROLE_NO_ACCESS;
/**
* @var string
* @ORM\Column(type="string", nullable=false)
* @Assert\NotBlank()
*/
private $module_bookings = AdminRoleConstant::ROLE_NO_ACCESS;
/**
* @var string
* @ORM\Column(type="string", nullable=false)
* @Assert\NotBlank()
*/
private $module_bookings_details = AdminRoleConstant::ROLE_NO_ACCESS;
/**
* @var string
* @ORM\Column(type="string", nullable=false)
* @Assert\NotBlank()
*/
private $module_vehicles = AdminRoleConstant::ROLE_NO_ACCESS;
/**
* @var string
* @ORM\Column(type="string", nullable=false)
* @Assert\NotBlank()
*/
private $module_spot_ratings = AdminRoleConstant::ROLE_NO_ACCESS;
/**
* @var string
* @ORM\Column(type="string", nullable=false)
* @Assert\NotBlank()
*/
private $module_operational_countries = AdminRoleConstant::ROLE_NO_ACCESS;
/**
* @var string
* @ORM\Column(type="string", nullable=false)
* @Assert\NotBlank()
*/
private $module_admin_users = AdminRoleConstant::ROLE_NO_ACCESS;
/**
* @var string
* @ORM\Column(type="string", nullable=false)
* @Assert\NotBlank()
*/
private $module_pricing_data = AdminRoleConstant::ROLE_NO_ACCESS;
/**
* @var string
* @ORM\Column(type="string", nullable=false)
* @Assert\NotBlank()
*/
private $module_request_call_back = AdminRoleConstant::ROLE_NO_ACCESS;
/**
* @var string
* @ORM\Column(type="string", nullable=false)
* @Assert\NotBlank()
*/
private $module_messages = AdminRoleConstant::ROLE_NO_ACCESS;
/**
* @var string
* @ORM\Column(type="string", nullable=false)
* @Assert\NotBlank()
*/
private $module_bugs_reported = AdminRoleConstant::ROLE_NO_ACCESS;
/**
* @var string
* @ORM\Column(type="string", nullable=false)
* @Assert\NotBlank()
*/
private $module_new_ideas = AdminRoleConstant::ROLE_NO_ACCESS;
/**
* @var string
* @ORM\Column(type="string", nullable=false)
* @Assert\NotBlank()
*/
private $module_live_chat = AdminRoleConstant::ROLE_NO_ACCESS;
/**
* @var string
* @ORM\Column(type="string", nullable=false)
* @Assert\NotBlank()
*/
private $module_payout = AdminRoleConstant::ROLE_NO_ACCESS;
/**
* @var string
* @ORM\Column(type="string", nullable=false)
* @Assert\NotBlank()
*/
private $module_transfer = AdminRoleConstant::ROLE_NO_ACCESS;
/**
* @var string
* @ORM\Column(type="string", nullable=false)
* @Assert\NotBlank()
*/
private $module_promo_code = AdminRoleConstant::ROLE_NO_ACCESS;
/**
* @var string
* @ORM\Column(type="string", nullable=false)
* @Assert\NotBlank()
*/
private $module_notifications = AdminRoleConstant::ROLE_NO_ACCESS;
/**
* @var string
* @ORM\Column(type="string", nullable=false)
* @Assert\NotBlank()
*/
private $module_user_data_deletion = AdminRoleConstant::ROLE_NO_ACCESS;
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
/**
* @return string
*/
public function getModuleDashboard()
{
return $this->module_dashboard;
}
/**
* @param string $module_dashboard
*/
public function setModuleDashboard(string $module_dashboard)
{
$this->module_dashboard = $module_dashboard;
}
/**
* @return string
*/
public function getModuleUser()
{
return $this->module_user;
}
/**
* @param string $module_user
*/
public function setModuleUser(string $module_user)
{
$this->module_user = $module_user;
}
/**
* @return string
*/
public function getModuleUserDetails()
{
return $this->module_user_details;
}
/**
* @param string $module_user_details
*/
public function setModuleUserDetails(string $module_user_details)
{
$this->module_user_details = $module_user_details;
}
/**
* @return string
*/
public function getModuleParkingSpot()
{
return $this->module_parking_spot;
}
/**
* @param string $module_parking_spot
*/
public function setModuleParkingSpot(string $module_parking_spot)
{
$this->module_parking_spot = $module_parking_spot;
}
/**
* @return string
*/
public function getModuleParkingSpotDetails()
{
return $this->module_parking_spot_details;
}
/**
* @param string $module_parking_spot_details
*/
public function setModuleParkingSpotDetails(string $module_parking_spot_details)
{
$this->module_parking_spot_details = $module_parking_spot_details;
}
/**
* @return string
*/
public function getModuleBookings()
{
return $this->module_bookings;
}
/**
* @param string $module_bookings
*/
public function setModuleBookings(string $module_bookings)
{
$this->module_bookings = $module_bookings;
}
/**
* @return string
*/
public function getModuleBookingsDetails()
{
return $this->module_bookings_details;
}
/**
* @param string $module_bookings_details
*/
public function setModuleBookingsDetails(string $module_bookings_details)
{
$this->module_bookings_details = $module_bookings_details;
}
/**
* @return string
*/
public function getModuleVehicles()
{
return $this->module_vehicles;
}
/**
* @param string $module_vehicles
*/
public function setModuleVehicles(string $module_vehicles)
{
$this->module_vehicles = $module_vehicles;
}
/**
* @return string
*/
public function getModuleSpotRatings()
{
return $this->module_spot_ratings;
}
/**
* @param string $module_spot_ratings
*/
public function setModuleSpotRatings(string $module_spot_ratings)
{
$this->module_spot_ratings = $module_spot_ratings;
}
/**
* @return string
*/
public function getModuleOperationalCountries()
{
return $this->module_operational_countries;
}
/**
* @param string $module_operational_countries
*/
public function setModuleOperationalCountries(string $module_operational_countries)
{
$this->module_operational_countries = $module_operational_countries;
}
/**
* @return string
*/
public function getModuleAdminUsers()
{
return $this->module_admin_users;
}
/**
* @param string $module_admin_users
*/
public function setModuleAdminUsers(string $module_admin_users)
{
$this->module_admin_users = $module_admin_users;
}
/**
* @return string
*/
public function getModulePricingData()
{
return $this->module_pricing_data;
}
/**
* @param string $module_pricing_data
*/
public function setModulePricingData(string $module_pricing_data)
{
$this->module_pricing_data = $module_pricing_data;
}
/**
* @return string
*/
public function getModuleRequestCallBack()
{
return $this->module_request_call_back;
}
/**
* @param string $module_request_call_back
*/
public function setModuleRequestCallBack(string $module_request_call_back)
{
$this->module_request_call_back = $module_request_call_back;
}
/**
* @return string
*/
public function getModuleMessages()
{
return $this->module_messages;
}
/**
* @param string $module_messages
*/
public function setModuleMessages(string $module_messages)
{
$this->module_messages = $module_messages;
}
/**
* @return string
*/
public function getModuleBugsReported()
{
return $this->module_bugs_reported;
}
/**
* @param string $module_bugs_reported
*/
public function setModuleBugsReported(string $module_bugs_reported)
{
$this->module_bugs_reported = $module_bugs_reported;
}
/**
* @return string
*/
public function getModuleNewIdeas()
{
return $this->module_new_ideas;
}
/**
* @param string $module_new_ideas
*/
public function setModuleNewIdeas(string $module_new_ideas)
{
$this->module_new_ideas = $module_new_ideas;
}
/**
* @return string
*/
public function getModuleLiveChat()
{
return $this->module_live_chat;
}
/**
* @param string $module_live_chat
*/
public function setModuleLiveChat(string $module_live_chat)
{
$this->module_live_chat = $module_live_chat;
}
/**
* @return Admin_User
*/
public function getAdminUser()
{
return $this->admin_user;
}
/**
* @param Admin_User $admin_user
*/
public function setAdminUser(Admin_User $admin_user)
{
$this->admin_user = $admin_user;
}
/**
* @return string
*/
public function getModulePayout()
{
return $this->module_payout;
}
/**
* @param string $module_payout
*/
public function setModulePayout(string $module_payout)
{
$this->module_payout = $module_payout;
}
/**
* @return string
*/
public function getModuleTransfer()
{
return $this->module_transfer;
}
/**
* @param string $module_transfer
*/
public function setModuleTransfer(string $module_transfer)
{
$this->module_transfer = $module_transfer;
}
/**
* @return string
*/
public function getModulePromoCode()
{
return $this->module_promo_code;
}
/**
* @param string $module_promo_code
*/
public function setModulePromoCode(string $module_promo_code)
{
$this->module_promo_code = $module_promo_code;
}
/**
* @return string
*/
public function getModuleNotifications()
{
return $this->module_notifications;
}
/**
* @param string $module_notifications
*/
public function setModuleNotifications(string $module_notifications)
{
$this->module_notifications = $module_notifications;
}
/**
* @return string
*/
public function getModuleUserDataDeletion()
{
return $this->module_user_data_deletion;
}
/**
* @param string $module_user_data_deletion
*/
public function setModuleUserDataDeletion($module_user_data_deletion)
{
$this->module_user_data_deletion = $module_user_data_deletion;
}
/**
* @var int
* @ORM\Column(type="integer", nullable=false)
*/
private $updatedBy = 0;
/**
* @var int
* @ORM\Column(type="integer", nullable=false)
*/
private $createdBy = 0;
/**
* @return int
*/
public function getUpdatedBy()
{
return $this->updatedBy;
}
/**
* @param int $updatedBy
*/
public function setUpdatedBy(int $updatedBy)
{
$this->updatedBy = $updatedBy;
}
/**
* @return int
*/
public function getCreatedBy()
{
return $this->createdBy;
}
/**
* @param int $createdBy
*/
public function setCreatedBy(int $createdBy)
{
$this->createdBy = $createdBy;
}
/**
* @var string $created
*
* @ORM\Column(name="created_at", type="datetime", nullable=false)
*/
protected $createdAt;
/**
* @var string $updated
*
* @ORM\Column(name="updated_at", type="datetime", nullable=false)
*/
protected $updatedAt;
public function getCreatedAt()
{
return $this->createdAt;
}
public function getUpdatedAt()
{
return $this->updatedAt;
}
public function setUpdatedAt($updatedAt)
{
$this->updatedAt = $updatedAt;
return $this;
}
/**
* @ORM\PrePersist
*/
public function setCreatedAt()
{
$this->createdAt = new \DateTime();
$this->updatedAt = new \DateTime();
return $this;
}
/**
* @ORM\PreUpdate
*/
public function setUpdatedAtValue() {
$this->updatedAt = new \DateTime();
}
public function __construct() {
}
public function jsonSerialize()
{
return array(
'id' => $this->id,
'module_dashboard' => $this->module_dashboard,
'module_user' => $this->module_user,
'module_user_details' => $this->module_user_details,
'module_parking_spot' => $this->module_parking_spot,
'module_parking_spot_details' => $this->module_parking_spot_details,
'module_bookings' => $this->module_bookings,
'module_bookings_details' => $this->module_bookings_details,
'module_vehicles' => $this->module_vehicles,
'module_spot_ratings' => $this->module_spot_ratings,
'module_operational_countries' => $this->module_operational_countries,
'module_admin_users' => $this->module_admin_users,
'module_pricing_data' => $this->module_pricing_data,
'module_request_call_back' => $this->module_request_call_back,
'module_messages' => $this->module_messages,
'module_bugs_reported' => $this->module_bugs_reported,
'module_new_ideas' => $this->module_new_ideas,
'module_live_chat' => $this->module_live_chat,
'module_payout' => $this->module_payout,
'module_transfer' => $this->module_transfer,
'module_promo_code' => $this->module_promo_code,
'module_notifications' => $this->module_notifications,
'module_user_data_deletion' => $this->module_user_data_deletion,
);
}
}