src/Entity/MobileAppUsers.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  7. use Symfony\Component\Serializer\Annotation\Groups;
  8. use Symfony\Component\Validator\Constraints as Assert;
  9. /**
  10.  * MobileAppUsers
  11.  *
  12.  * @ORM\Table(name="MobileApp_users")
  13.  * @ORM\Entity(repositoryClass="App\Repository\MobileAppUsersRepository")
  14.  * @ORM\HasLifecycleCallbacks()
  15.  */
  16. class MobileAppUsers
  17. {
  18.     /**
  19.      * @var int
  20.      *
  21.      * @ORM\Column(name="uid", type="integer")
  22.      * @ORM\Id
  23.      * @ORM\GeneratedValue(strategy="AUTO")
  24.      * @Groups({"mobileappuser"})
  25.      */
  26.     private $id;
  27.     /**
  28.      * @var string
  29.      *
  30.      * @ORM\Column(name="username", type="string", length=255, nullable=true)
  31.      * @Groups({"mobileappuser"})
  32.      */
  33.     private $username;
  34.     /**
  35.      * @var string
  36.      *
  37.      * @ORM\Column(name="email", type="string", length=255, unique=true)
  38.      * @Groups({"mobileappuser"})
  39.      */
  40.     private $email;
  41.     /**
  42.      * @var string
  43.      *
  44.      * @ORM\Column(name="pass", type="string", nullable=true, length=255)
  45.      */
  46.     private $pass;
  47.     /**
  48.      * @var string
  49.      *
  50.      * @ORM\Column(name="fullname", type="string", length=255, nullable=true)
  51.      * @Groups({"mobileappuser"})
  52.      */
  53.     private $fullname;
  54.     /**
  55.      * @var int
  56.      *
  57.      * @ORM\Column(name="role", type="integer")
  58.      */
  59.     private $role;
  60.     /**
  61.      * @var \DateTime
  62.      *
  63.      * @ORM\Column(name="access", type="datetime", nullable=true)
  64.      */
  65.     private $access;
  66.     /**
  67.      * @var boolean
  68.      *
  69.      * @ORM\Column(name="status", type="boolean")
  70.      * @Groups({"mobileappuser"})
  71.      */
  72.     private $status;
  73.     /**
  74.      * @var \DateTime
  75.      *
  76.      * @ORM\Column(name="created_at", type="datetime")
  77.      */
  78.     private $createdAt;
  79.     /**
  80.      * @var int
  81.      *
  82.      * @ORM\Column(name="created_id", type="integer")
  83.      */
  84.     private $createdId;
  85.     /**
  86.      * @var \DateTime
  87.      *
  88.      * @ORM\Column(name="updated_at", type="datetime")
  89.      */
  90.     private $updatedAt;
  91.     /**
  92.      * @var int
  93.      *
  94.      * @ORM\Column(name="updated_id", type="integer")
  95.      */
  96.     private $updatedId;
  97.     /**
  98.      * @var string
  99.      *
  100.      * @ORM\Column(name="image", type="string", length=255, nullable=true)
  101.      * @Assert\File(
  102.      *     maxSize = "1M",
  103.      *     mimeTypes = {"image/bmp", "image/jpeg", "image/png", "image/jpg"},
  104.      *     mimeTypesMessage = "Please upload a valid bmp jpeg png image File")
  105.      * @Groups({"mobileappuser"})
  106.      */
  107.     private $image;
  108.     /**
  109.      * @var bool
  110.      *
  111.      * @ORM\Column(name="share_contact", type="boolean", options={"default"=0}, nullable=true)
  112.      * @Groups({"mobileappuser"})
  113.      */
  114.     private $shareContact false;
  115.     /**
  116.      * @var bool
  117.      *
  118.      * @ORM\Column(name="communications", type="boolean", options={"default"=0}, nullable=true)
  119.      * @Groups({"mobileappuser"})
  120.      */
  121.     private $communications false;
  122.     /**
  123.      * @ORM\OneToMany(targetEntity=AppMobileGuest::class, mappedBy="MobileAppUsersParent")
  124.      */
  125.     private $appMobileGuests;
  126.     public function __construct()
  127.     {
  128.         $this->appMobileGuests = new ArrayCollection();
  129.     }
  130.     /**
  131.      * Get id
  132.      *
  133.      * @return int
  134.      */
  135.     public function getId()
  136.     {
  137.         return $this->id;
  138.     }
  139.     /**
  140.      * Set username
  141.      *
  142.      * @param string $username
  143.      *
  144.      * @return MobileAppUsers
  145.      */
  146.     public function setUsername($username)
  147.     {
  148.         $this->username $username;
  149.         return $this;
  150.     }
  151.     /**
  152.      * Get username
  153.      *
  154.      * @return string
  155.      */
  156.     public function getUsername()
  157.     {
  158.         return $this->username;
  159.     }
  160.     /**
  161.      * Set pass
  162.      *
  163.      * @param string $pass
  164.      *
  165.      * @return MobileAppUsers
  166.      */
  167.     public function setPass($pass)
  168.     {
  169.         $this->pass $pass;
  170.         return $this;
  171.     }
  172.     /**
  173.      * Get pass
  174.      *
  175.      * @return string
  176.      */
  177.     public function getPass()
  178.     {
  179.         return $this->pass;
  180.     }
  181.     /**
  182.      * Set fullname
  183.      *
  184.      * @param string $fullname
  185.      *
  186.      * @return MobileAppUsers
  187.      */
  188.     public function setFullname($fullname)
  189.     {
  190.         $this->fullname $fullname;
  191.         return $this;
  192.     }
  193.     /**
  194.      * Get fullname
  195.      *
  196.      * @return string
  197.      */
  198.     public function getFullname()
  199.     {
  200.         return $this->fullname;
  201.     }
  202.     /**
  203.      * Set role
  204.      *
  205.      * @param integer $role
  206.      *
  207.      * @return MobileAppUsers
  208.      */
  209.     public function setRole($role)
  210.     {
  211.         $this->role $role;
  212.         return $this;
  213.     }
  214.     /**
  215.      * Get role
  216.      *
  217.      * @return int
  218.      */
  219.     public function getRole()
  220.     {
  221.         return $this->role;
  222.     }
  223.     /**
  224.      * Set access
  225.      *
  226.      * @param \DateTime $access
  227.      *
  228.      * @return MobileAppUsers
  229.      */
  230.     public function setAccess(\DateTime $access)
  231.     {
  232.         $this->access $access;
  233.         return $this;
  234.     }
  235.     /**
  236.      * Get access
  237.      *
  238.      * @return \DateTime
  239.      */
  240.     public function getAccess()
  241.     {
  242.         return $this->access;
  243.     }
  244.     /**
  245.      * Set status
  246.      *
  247.      * @param boolean $status
  248.      *
  249.      * @return MobileAppUsers
  250.      */
  251.     public function setStatus($status)
  252.     {
  253.         $this->status $status;
  254.         return $this;
  255.     }
  256.     /**
  257.      * Get status
  258.      *
  259.      * @return boolean
  260.      */
  261.     public function getStatus()
  262.     {
  263.         return $this->status;
  264.     }
  265.     /**
  266.      * Set createdAt
  267.      *
  268.      * @param \DateTime $createdAt
  269.      *
  270.      * @return MobileAppUsers
  271.      */
  272.     public function setCreatedAt(\Datetime $createdAt)
  273.     {
  274.         $this->createdAt $createdAt;
  275.         return $this;
  276.     }
  277.     /**
  278.      * Get createdAt
  279.      *
  280.      * @return \DateTime
  281.      */
  282.     public function getCreatedAt()
  283.     {
  284.         return $this->createdAt;
  285.     }
  286.     /**
  287.      * Set createdId
  288.      *
  289.      * @param integer $createdId
  290.      *
  291.      * @return MobileAppUsers
  292.      */
  293.     public function setCreatedId($createdId)
  294.     {
  295.         $this->createdId $createdId;
  296.         return $this;
  297.     }
  298.     /**
  299.      * Get createdId
  300.      *
  301.      * @return int
  302.      */
  303.     public function getCreatedId()
  304.     {
  305.         return $this->createdId;
  306.     }
  307.     /**
  308.      * Set updatedAt
  309.      *
  310.      * @param \DateTime $updatedAt
  311.      *
  312.      * @return MobileAppUsers
  313.      */
  314.     public function setUpdatedAt(\Datetime $updatedAt)
  315.     {
  316.         $this->updatedAt $updatedAt;
  317.         return $this;
  318.     }
  319.     /**
  320.      * Get updatedAt
  321.      *
  322.      * @return \DateTime
  323.      */
  324.     public function getUpdatedAt()
  325.     {
  326.         return $this->updatedAt;
  327.     }
  328.     /**
  329.      * Set updatedId
  330.      *
  331.      * @param integer $updatedId
  332.      *
  333.      * @return MobileAppUsers
  334.      */
  335.     public function setUpdatedId($updatedId)
  336.     {
  337.         $this->updatedId $updatedId;
  338.         return $this;
  339.     }
  340.     /**
  341.      * Get updatedId
  342.      *
  343.      * @return int
  344.      */
  345.     public function getUpdatedId()
  346.     {
  347.         return $this->updatedId;
  348.     }
  349.     /**
  350.      * @ORM\PrePersist
  351.      */
  352.     public function setCreatedAtValue()
  353.     {
  354.         $this->createdAt = new \Datetime();
  355.     }
  356.     /**
  357.      * @ORM\PrePersist
  358.      * @ORM\PreUpdate
  359.      */
  360.     public function setUpdatedAtValue()
  361.     {
  362.         $this->updatedAt = new \Datetime();
  363.     }
  364.     /**
  365.      * Set email
  366.      *
  367.      * @param string $email
  368.      *
  369.      * @return MobileAppUsers
  370.      */
  371.     public function setEmail($email)
  372.     {
  373.         $this->email $email;
  374.         return $this;
  375.     }
  376.     /**
  377.      * Get email
  378.      *
  379.      * @return string
  380.      */
  381.     public function getEmail()
  382.     {
  383.         return $this->email;
  384.     }
  385.     /**
  386.      * Set image
  387.      *
  388.      * @param string $image
  389.      *
  390.      * @return MobileAppUsers
  391.      */
  392.     public function setImage($image)
  393.     {
  394.         $this->image $image;
  395.     
  396.         return $this;
  397.     }
  398.     /**
  399.      * Get image
  400.      *
  401.      * @return string
  402.      */
  403.     public function getImage()
  404.     {
  405.         return $this->image;
  406.     }
  407.     /**
  408.      * Set shareContact
  409.      *
  410.      * @param boolean $shareContact
  411.      *
  412.      * @return MobileAppUsers
  413.      */
  414.     public function setShareContact($shareContact)
  415.     {
  416.         $this->shareContact $shareContact;
  417.     
  418.         return $this;
  419.     }
  420.     /**
  421.      * Get shareContact
  422.      *
  423.      * @return boolean
  424.      */
  425.     public function getShareContact()
  426.     {
  427.         return $this->shareContact;
  428.     }
  429.     /**
  430.      * Set communications
  431.      *
  432.      * @param boolean $communications
  433.      *
  434.      * @return MobileAppUsers
  435.      */
  436.     public function setCommunications($communications)
  437.     {
  438.         $this->communications $communications;
  439.     
  440.         return $this;
  441.     }
  442.     /**
  443.      * Get communications
  444.      *
  445.      * @return boolean
  446.      */
  447.     public function getCommunications()
  448.     {
  449.         return $this->communications;
  450.     }
  451.     /**
  452.      * @return Collection<int, AppMobileGuest>
  453.      */
  454.     public function getAppMobileGuests(): Collection
  455.     {
  456.         return $this->appMobileGuests;
  457.     }
  458.     public function addAppMobileGuest(AppMobileGuest $appMobileGuest): self
  459.     {
  460.         if (!$this->appMobileGuests->contains($appMobileGuest)) {
  461.             $this->appMobileGuests[] = $appMobileGuest;
  462.             $appMobileGuest->setMobileAppUsersParent($this);
  463.         }
  464.         return $this;
  465.     }
  466.     public function removeAppMobileGuest(AppMobileGuest $appMobileGuest): self
  467.     {
  468.         if ($this->appMobileGuests->removeElement($appMobileGuest)) {
  469.             // set the owning side to null (unless already changed)
  470.             if ($appMobileGuest->getMobileAppUsersParent() === $this) {
  471.                 $appMobileGuest->setMobileAppUsersParent(null);
  472.             }
  473.         }
  474.         return $this;
  475.     }
  476. }