src/Entity/Log.php line 17

Open in your IDE?
  1. <?php
  2. /**
  3.  * Created by PhpStorm.
  4.  * User: sbrun
  5.  * Date: 2018-03-19
  6.  * Time: 13:13
  7.  */
  8. namespace App\Entity;
  9. use Doctrine\ORM\Mapping as ORM;
  10. /**
  11.  * @ORM\Entity
  12.  * @ORM\Table(name="log")
  13.  * @ORM\Entity(repositoryClass="App\Repository\LogRepository")
  14.  */
  15. class Log
  16. {
  17.     /**
  18.      * @ORM\Column(type="integer")
  19.      * @ORM\Id
  20.      * @ORM\GeneratedValue(strategy="AUTO")
  21.      */
  22.     protected $id;
  23.     /**
  24.      * @ORM\Column(name="date", type="datetime")
  25.      */
  26.     protected $date;
  27.     /**
  28.      * @ORM\Column(name="ip", type="string", length=75, nullable=true)
  29.      */
  30.     protected $ip;
  31.     /**
  32.      * @ORM\Column(name="username", type="string", length=180, nullable=true)
  33.      */
  34.     protected $username;
  35.     /**
  36.      * @ORM\Column(name="message", type="text")
  37.      */
  38.     protected $message;
  39.     /**
  40.      * has one Company
  41.      *
  42.      * @ORM\ManyToOne(targetEntity="App\Entity\Company")
  43.      * @ORM\JoinColumn(name="company_id", referencedColumnName="id", nullable=true)
  44.      */
  45.     protected $company;
  46.     /**
  47.      * @return mixed
  48.      */
  49.     public function getCompany()
  50.     {
  51.         return $this->company;
  52.     }
  53.     /**
  54.      * @param Company $company
  55.      */
  56.     public function setCompany(Company $company)
  57.     {
  58.         $this->company $company;
  59.     }
  60.     /**
  61.      * ConnexionsLog constructor.
  62.      */
  63.     public function __construct()
  64.     {
  65.         $this->date = new \DateTime();
  66.     }
  67.     /**
  68.      * @return mixed
  69.      */
  70.     public function getId()
  71.     {
  72.         return $this->id;
  73.     }
  74.     /**
  75.      * @return mixed
  76.      */
  77.     public function getDate()
  78.     {
  79.         return $this->date;
  80.     }
  81.     /**
  82.      * @param mixed $date
  83.      */
  84.     public function setDate($date)
  85.     {
  86.         $this->date $date;
  87.     }
  88.     /**
  89.      * @return mixed
  90.      */
  91.     public function getIp()
  92.     {
  93.         return $this->ip;
  94.     }
  95.     /**
  96.      * @param mixed $ip
  97.      */
  98.     public function setIp($ip)
  99.     {
  100.         $this->ip $ip;
  101.     }
  102.     /**
  103.      * @return mixed
  104.      */
  105.     public function getUsername()
  106.     {
  107.         return $this->username;
  108.     }
  109.     /**
  110.      * @param mixed $username
  111.      */
  112.     public function setUsername($username)
  113.     {
  114.         $this->username $username;
  115.     }
  116.     /**
  117.      * @return mixed
  118.      */
  119.     public function getMessage()
  120.     {
  121.         return $this->message;
  122.     }
  123.     /**
  124.      * @param mixed $message
  125.      */
  126.     public function setMessage($message)
  127.     {
  128.         $this->message $message;
  129.     }
  130. }