54 lines
927 B
PHP
Raw Normal View History

2024-07-11 17:01:16 +02:00
<?php
namespace App\Entity;
use App\Config\EventAction;
2024-07-11 22:20:20 +02:00
use App\Repository\EntityEventRepository;
2024-07-11 17:01:16 +02:00
use Doctrine\ORM\Mapping as ORM;
2024-07-11 22:20:20 +02:00
#[ORM\MappedSuperclass]
2024-07-11 18:29:22 +02:00
class Event
2024-07-11 17:01:16 +02:00
{
2024-07-11 18:29:22 +02:00
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(enumType: EventAction::class)]
private ?EventAction $action = null;
2024-07-11 17:01:16 +02:00
#[ORM\Column]
private ?\DateTimeImmutable $date = null;
2024-07-11 18:29:22 +02:00
public function getId(): ?int
2024-07-11 17:01:16 +02:00
{
2024-07-11 18:29:22 +02:00
return $this->id;
2024-07-11 17:01:16 +02:00
}
2024-07-11 18:29:22 +02:00
public function getAction(): ?EventAction
2024-07-11 17:01:16 +02:00
{
2024-07-11 18:29:22 +02:00
return $this->action;
}
public function setAction(EventAction $action): static
{
$this->action = $action;
2024-07-11 17:01:16 +02:00
return $this;
}
2024-07-11 18:29:22 +02:00
public function getDate(): ?\DateTimeImmutable
2024-07-11 17:01:16 +02:00
{
2024-07-11 18:29:22 +02:00
return $this->date;
2024-07-11 17:01:16 +02:00
}
2024-07-11 18:29:22 +02:00
public function setDate(\DateTimeImmutable $date): static
2024-07-11 17:01:16 +02:00
{
2024-07-11 18:29:22 +02:00
$this->date = $date;
2024-07-11 17:01:16 +02:00
return $this;
}
}