vendor/novosga/core/Entity/Lotacao.php line 19

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the Novo SGA project.
  4.  *
  5.  * (c) Rogerio Lino <rogeriolino@gmail.com>
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. namespace Novosga\Entity;
  11. /**
  12.  * Definição de onde o usuário está lotado
  13.  *
  14.  * @author Rogerio Lino <rogeriolino@gmail.com>
  15.  */
  16. class Lotacao implements \JsonSerializable
  17. {
  18.     /**
  19.      * @var int
  20.      */
  21.     private $id;
  22.     
  23.     /**
  24.      * @var Usuario
  25.      */
  26.     private $usuario;
  27.     /**
  28.      * @var Unidade
  29.      */
  30.     private $unidade;
  31.     /**
  32.      * @var Perfil
  33.      */
  34.     private $perfil;
  35.     public function __construct()
  36.     {
  37.     }
  38.     
  39.     public function getId()
  40.     {
  41.         return $this->id;
  42.     }
  43.     /**
  44.      * Modifica usuario.
  45.      *
  46.      * @param $usuario
  47.      *
  48.      * @return none
  49.      */
  50.     public function setUsuario(Usuario $usuario): self
  51.     {
  52.         $this->usuario $usuario;
  53.         return $this;
  54.     }
  55.     /**
  56.      * Retorna objeto usuario.
  57.      *
  58.      * @return Usuario $usuario
  59.      */
  60.     public function getUsuario()
  61.     {
  62.         return $this->usuario;
  63.     }
  64.     /**
  65.      * Modifica unidade.
  66.      *
  67.      * @param $unidade
  68.      */
  69.     public function setUnidade(Unidade $unidade): self
  70.     {
  71.         $this->unidade $unidade;
  72.         return $this;
  73.     }
  74.     /**
  75.      * Retorna objeto Unidade.
  76.      *
  77.      * @return Unidade
  78.      */
  79.     public function getUnidade()
  80.     {
  81.         return $this->unidade;
  82.     }
  83.     /**
  84.      * Modifica perfil.
  85.      *
  86.      * @param $perfil
  87.      *
  88.      * @return none
  89.      */
  90.     public function setPerfil(Perfil $perfil): self
  91.     {
  92.         $this->perfil $perfil;
  93.         return $this;
  94.     }
  95.     /**
  96.      * Retorna objeto Perfil.
  97.      *
  98.      * @return Perfil $perfil
  99.      */
  100.     public function getPerfil()
  101.     {
  102.         return $this->perfil;
  103.     }
  104.     public function jsonSerialize()
  105.     {
  106.         return [
  107.             'id'      => $this->getId(),
  108.             'perfil'  => $this->getPerfil(),
  109.             'unidade' => $this->getUnidade(),
  110.             'usuario' => $this->getUsuario(),
  111.         ];
  112.     }
  113. }