111 lines
1.9 KiB
PHP
111 lines
1.9 KiB
PHP
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use App\Repository\LogRepository;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
#[ORM\Entity(repositoryClass: LogRepository::class)]
|
|
class Log
|
|
{
|
|
#[ORM\Id]
|
|
#[ORM\GeneratedValue]
|
|
#[ORM\Column]
|
|
private ?int $id = null;
|
|
|
|
#[ORM\Column(length: 255)]
|
|
private ?string $message = null;
|
|
|
|
#[ORM\Column]
|
|
private ?\DateTimeImmutable $timestamp = null;
|
|
|
|
#[ORM\Column(length: 32)]
|
|
private ?string $level = null;
|
|
|
|
#[ORM\Column(length: 32)]
|
|
private ?string $channel = null;
|
|
|
|
#[ORM\Column]
|
|
private array $context = [];
|
|
|
|
#[ORM\Column]
|
|
private array $extra = [];
|
|
|
|
public function getId(): ?int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function getMessage(): ?string
|
|
{
|
|
return $this->message;
|
|
}
|
|
|
|
public function setMessage(string $message): static
|
|
{
|
|
$this->message = $message;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getTimestamp(): ?\DateTimeImmutable
|
|
{
|
|
return $this->timestamp;
|
|
}
|
|
|
|
public function setTimestamp(\DateTimeImmutable $timestamp): static
|
|
{
|
|
$this->timestamp = $timestamp;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getLevel(): ?string
|
|
{
|
|
return $this->level;
|
|
}
|
|
|
|
public function setLevel(string $level): static
|
|
{
|
|
$this->level = $level;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getChannel(): ?string
|
|
{
|
|
return $this->channel;
|
|
}
|
|
|
|
public function setChannel(string $channel): static
|
|
{
|
|
$this->channel = $channel;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getContext(): array
|
|
{
|
|
return $this->context;
|
|
}
|
|
|
|
public function setContext(array $context): static
|
|
{
|
|
$this->context = $context;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getExtra(): array
|
|
{
|
|
return $this->extra;
|
|
}
|
|
|
|
public function setExtra(array $extra): static
|
|
{
|
|
$this->extra = $extra;
|
|
|
|
return $this;
|
|
}
|
|
}
|