Commit e877e0a9f93f53747395001eee4709f66db10a14

Authored by Bruno Noronha
1 parent 9929bfe2
Exists in master

Grava informações de ultimo usuário logado na tabela log_user_logado

Showing 1 changed file with 119 additions and 0 deletions   Show diff stats
src/Cacic/CommonBundle/Entity/LogUserLogado.php 0 → 100644
... ... @@ -0,0 +1,119 @@
  1 +<?php
  2 +
  3 +namespace Cacic\CommonBundle\Entity;
  4 +
  5 +use Doctrine\ORM\Mapping as ORM;
  6 +use Symfony\Component\Validator\Constraints\DateTime;
  7 +
  8 +/**
  9 + * LogAcesso
  10 + */
  11 +class LogUserLogado
  12 +{
  13 + /**
  14 + * @var integer
  15 + */
  16 + private $idLogUserLogado;
  17 +
  18 + /**
  19 + * @var \DateTime
  20 + */
  21 + private $data;
  22 +
  23 + /**
  24 + * @var \Cacic\CommonBundle\Entity\Computador
  25 + */
  26 + private $idComputador;
  27 +
  28 + /**
  29 + * Get idLogUserLogado
  30 + *
  31 + * @return integer
  32 + */
  33 + public function getIdLogUserLogado()
  34 + {
  35 + return $this->idLogUserLogado;
  36 + }
  37 +
  38 + /**
  39 + * Set data
  40 + *
  41 + * @param \DateTime $data
  42 + * @return LogUserLogado
  43 + */
  44 + public function setData($data)
  45 + {
  46 + $this->data = $data;
  47 +
  48 + return $this;
  49 + }
  50 +
  51 + /**
  52 + * Get data
  53 + *
  54 + * @return \DateTime
  55 + */
  56 + public function getData()
  57 + {
  58 + return $this->data;
  59 + }
  60 +
  61 + /**
  62 + * Set idComputador
  63 + *
  64 + * @param \Cacic\CommonBundle\Entity\Computador $idComputador
  65 + * @return LogUserLogado
  66 + */
  67 + public function setIdComputador(\Cacic\CommonBundle\Entity\Computador $idComputador = null)
  68 + {
  69 + $this->idComputador = $idComputador;
  70 +
  71 + return $this;
  72 + }
  73 +
  74 + /**
  75 + * Get idComputador
  76 + *
  77 + * @return \Cacic\CommonBundle\Entity\Computador
  78 + */
  79 + public function getIdComputador()
  80 + {
  81 + return $this->idComputador;
  82 + }
  83 +
  84 + /**
  85 + * @PrePersist
  86 + */
  87 + public function onPrePersistSetRegistrationDate()
  88 + {
  89 + $this->data = new \DateTime();
  90 + }
  91 +
  92 + /**
  93 + * @var string
  94 + */
  95 + private $usuario;
  96 +
  97 + /**
  98 + * Set usuario
  99 + *
  100 + * @param string $usuario
  101 + * @return LogUserLogado
  102 + */
  103 + public function setUsuario($usuario)
  104 + {
  105 + $this->usuario = $usuario;
  106 +
  107 + return $this;
  108 + }
  109 +
  110 + /**
  111 + * Get usuario
  112 + *
  113 + * @return string
  114 + */
  115 + public function getUsuario()
  116 + {
  117 + return $this->usuario;
  118 + }
  119 +}
0 120 \ No newline at end of file
... ...