src/Entity/Log.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\LogRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=LogRepository::class)
  7.  */
  8. class Log
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\Column(type="datetime_immutable")
  18.      */
  19.     private $date;
  20.     /**
  21.      * @ORM\Column(type="string", length=255)
  22.      */
  23.     private $action;
  24.     /**
  25.      * @ORM\Column(type="string", length=255)
  26.      */
  27.     private $company;
  28.     /**
  29.      * @ORM\Column(type="json", length=255, nullable=true)
  30.      */
  31.     private $data;
  32.     /**
  33.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="logs")
  34.      * @ORM\JoinColumn(nullable=false)
  35.      */
  36.     private $user;
  37.     /**
  38.      * @ORM\Column(type="string", length=255, nullable=true)
  39.      */
  40.     private $badge;
  41.     public function getId(): ?int
  42.     {
  43.         return $this->id;
  44.     }
  45.     public function getDate(): ?\DateTimeImmutable
  46.     {
  47.         return $this->date;
  48.     }
  49.     public function setDate(\DateTimeImmutable $date): self
  50.     {
  51.         $this->date $date;
  52.         return $this;
  53.     }
  54.     public function getAction(): ?string
  55.     {
  56.         return $this->action;
  57.     }
  58.     public function setAction(string $action): self
  59.     {
  60.         $this->action $action;
  61.         return $this;
  62.     }
  63.     public function getCompany(): ?string
  64.     {
  65.         return $this->company;
  66.     }
  67.     public function setCompany(string $company): self
  68.     {
  69.         $this->company $company;
  70.         return $this;
  71.     }
  72.     public function getData(): ?array
  73.     {
  74.         return $this->data;
  75.     }
  76.     public function setData(?array $data): self
  77.     {
  78.         $this->data $data;
  79.         return $this;
  80.     }
  81.     public function getUser(): ?User
  82.     {
  83.         return $this->user;
  84.     }
  85.     public function setUser(?User $user): self
  86.     {
  87.         $this->user $user;
  88.         return $this;
  89.     }
  90.     public function getBadge(): ?string
  91.     {
  92.         return $this->badge;
  93.     }
  94.     public function setBadge(?string $badge): self
  95.     {
  96.         $this->badge $badge;
  97.         return $this;
  98.     }
  99. }