<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
/**
* MobileAppUsers
*
* @ORM\Table(name="MobileApp_users")
* @ORM\Entity(repositoryClass="App\Repository\MobileAppUsersRepository")
* @ORM\HasLifecycleCallbacks()
*/
class MobileAppUsers
{
/**
* @var int
*
* @ORM\Column(name="uid", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @Groups({"mobileappuser"})
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="username", type="string", length=255, nullable=true)
* @Groups({"mobileappuser"})
*/
private $username;
/**
* @var string
*
* @ORM\Column(name="email", type="string", length=255, unique=true)
* @Groups({"mobileappuser"})
*/
private $email;
/**
* @var string
*
* @ORM\Column(name="pass", type="string", nullable=true, length=255)
*/
private $pass;
/**
* @var string
*
* @ORM\Column(name="fullname", type="string", length=255, nullable=true)
* @Groups({"mobileappuser"})
*/
private $fullname;
/**
* @var int
*
* @ORM\Column(name="role", type="integer")
*/
private $role;
/**
* @var \DateTime
*
* @ORM\Column(name="access", type="datetime", nullable=true)
*/
private $access;
/**
* @var boolean
*
* @ORM\Column(name="status", type="boolean")
* @Groups({"mobileappuser"})
*/
private $status;
/**
* @var \DateTime
*
* @ORM\Column(name="created_at", type="datetime")
*/
private $createdAt;
/**
* @var int
*
* @ORM\Column(name="created_id", type="integer")
*/
private $createdId;
/**
* @var \DateTime
*
* @ORM\Column(name="updated_at", type="datetime")
*/
private $updatedAt;
/**
* @var int
*
* @ORM\Column(name="updated_id", type="integer")
*/
private $updatedId;
/**
* @var string
*
* @ORM\Column(name="image", type="string", length=255, nullable=true)
* @Assert\File(
* maxSize = "1M",
* mimeTypes = {"image/bmp", "image/jpeg", "image/png", "image/jpg"},
* mimeTypesMessage = "Please upload a valid bmp jpeg png image File")
* @Groups({"mobileappuser"})
*/
private $image;
/**
* @var bool
*
* @ORM\Column(name="share_contact", type="boolean", options={"default"=0}, nullable=true)
* @Groups({"mobileappuser"})
*/
private $shareContact = false;
/**
* @var bool
*
* @ORM\Column(name="communications", type="boolean", options={"default"=0}, nullable=true)
* @Groups({"mobileappuser"})
*/
private $communications = false;
/**
* @ORM\OneToMany(targetEntity=AppMobileGuest::class, mappedBy="MobileAppUsersParent")
*/
private $appMobileGuests;
public function __construct()
{
$this->appMobileGuests = new ArrayCollection();
}
/**
* Get id
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set username
*
* @param string $username
*
* @return MobileAppUsers
*/
public function setUsername($username)
{
$this->username = $username;
return $this;
}
/**
* Get username
*
* @return string
*/
public function getUsername()
{
return $this->username;
}
/**
* Set pass
*
* @param string $pass
*
* @return MobileAppUsers
*/
public function setPass($pass)
{
$this->pass = $pass;
return $this;
}
/**
* Get pass
*
* @return string
*/
public function getPass()
{
return $this->pass;
}
/**
* Set fullname
*
* @param string $fullname
*
* @return MobileAppUsers
*/
public function setFullname($fullname)
{
$this->fullname = $fullname;
return $this;
}
/**
* Get fullname
*
* @return string
*/
public function getFullname()
{
return $this->fullname;
}
/**
* Set role
*
* @param integer $role
*
* @return MobileAppUsers
*/
public function setRole($role)
{
$this->role = $role;
return $this;
}
/**
* Get role
*
* @return int
*/
public function getRole()
{
return $this->role;
}
/**
* Set access
*
* @param \DateTime $access
*
* @return MobileAppUsers
*/
public function setAccess(\DateTime $access)
{
$this->access = $access;
return $this;
}
/**
* Get access
*
* @return \DateTime
*/
public function getAccess()
{
return $this->access;
}
/**
* Set status
*
* @param boolean $status
*
* @return MobileAppUsers
*/
public function setStatus($status)
{
$this->status = $status;
return $this;
}
/**
* Get status
*
* @return boolean
*/
public function getStatus()
{
return $this->status;
}
/**
* Set createdAt
*
* @param \DateTime $createdAt
*
* @return MobileAppUsers
*/
public function setCreatedAt(\Datetime $createdAt)
{
$this->createdAt = $createdAt;
return $this;
}
/**
* Get createdAt
*
* @return \DateTime
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* Set createdId
*
* @param integer $createdId
*
* @return MobileAppUsers
*/
public function setCreatedId($createdId)
{
$this->createdId = $createdId;
return $this;
}
/**
* Get createdId
*
* @return int
*/
public function getCreatedId()
{
return $this->createdId;
}
/**
* Set updatedAt
*
* @param \DateTime $updatedAt
*
* @return MobileAppUsers
*/
public function setUpdatedAt(\Datetime $updatedAt)
{
$this->updatedAt = $updatedAt;
return $this;
}
/**
* Get updatedAt
*
* @return \DateTime
*/
public function getUpdatedAt()
{
return $this->updatedAt;
}
/**
* Set updatedId
*
* @param integer $updatedId
*
* @return MobileAppUsers
*/
public function setUpdatedId($updatedId)
{
$this->updatedId = $updatedId;
return $this;
}
/**
* Get updatedId
*
* @return int
*/
public function getUpdatedId()
{
return $this->updatedId;
}
/**
* @ORM\PrePersist
*/
public function setCreatedAtValue()
{
$this->createdAt = new \Datetime();
}
/**
* @ORM\PrePersist
* @ORM\PreUpdate
*/
public function setUpdatedAtValue()
{
$this->updatedAt = new \Datetime();
}
/**
* Set email
*
* @param string $email
*
* @return MobileAppUsers
*/
public function setEmail($email)
{
$this->email = $email;
return $this;
}
/**
* Get email
*
* @return string
*/
public function getEmail()
{
return $this->email;
}
/**
* Set image
*
* @param string $image
*
* @return MobileAppUsers
*/
public function setImage($image)
{
$this->image = $image;
return $this;
}
/**
* Get image
*
* @return string
*/
public function getImage()
{
return $this->image;
}
/**
* Set shareContact
*
* @param boolean $shareContact
*
* @return MobileAppUsers
*/
public function setShareContact($shareContact)
{
$this->shareContact = $shareContact;
return $this;
}
/**
* Get shareContact
*
* @return boolean
*/
public function getShareContact()
{
return $this->shareContact;
}
/**
* Set communications
*
* @param boolean $communications
*
* @return MobileAppUsers
*/
public function setCommunications($communications)
{
$this->communications = $communications;
return $this;
}
/**
* Get communications
*
* @return boolean
*/
public function getCommunications()
{
return $this->communications;
}
/**
* @return Collection<int, AppMobileGuest>
*/
public function getAppMobileGuests(): Collection
{
return $this->appMobileGuests;
}
public function addAppMobileGuest(AppMobileGuest $appMobileGuest): self
{
if (!$this->appMobileGuests->contains($appMobileGuest)) {
$this->appMobileGuests[] = $appMobileGuest;
$appMobileGuest->setMobileAppUsersParent($this);
}
return $this;
}
public function removeAppMobileGuest(AppMobileGuest $appMobileGuest): self
{
if ($this->appMobileGuests->removeElement($appMobileGuest)) {
// set the owning side to null (unless already changed)
if ($appMobileGuest->getMobileAppUsersParent() === $this) {
$appMobileGuest->setMobileAppUsersParent(null);
}
}
return $this;
}
}