mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
fix: update table scheme
This commit is contained in:
@@ -8,7 +8,6 @@ use Doctrine\ORM\Mapping as ORM;
|
||||
#[ORM\Entity(repositoryClass: DomainEventRepository::class)]
|
||||
class DomainEvent extends Event
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\ManyToOne(targetEntity: Domain::class, cascade: ['persist'], inversedBy: 'events')]
|
||||
#[ORM\JoinColumn(referencedColumnName: 'handle', nullable: false)]
|
||||
private ?Domain $domain = null;
|
||||
|
||||
@@ -9,7 +9,6 @@ use Doctrine\ORM\Mapping as ORM;
|
||||
class EntityEvent extends Event
|
||||
{
|
||||
|
||||
#[ORM\Id]
|
||||
#[ORM\ManyToOne(targetEntity: Entity::class, inversedBy: 'events')]
|
||||
#[ORM\JoinColumn(referencedColumnName: 'handle', nullable: false)]
|
||||
private ?Entity $entity = null;
|
||||
|
||||
@@ -10,6 +10,10 @@ use Doctrine\ORM\Mapping as ORM;
|
||||
class Event
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
private ?int $id = null;
|
||||
|
||||
#[ORM\Column(enumType: EventAction::class)]
|
||||
private ?EventAction $action = null;
|
||||
|
||||
@@ -17,6 +21,11 @@ class Event
|
||||
private ?DateTimeImmutable $date = null;
|
||||
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getAction(): ?EventAction
|
||||
{
|
||||
return $this->action;
|
||||
|
||||
Reference in New Issue
Block a user