Files
domain-watchdog/src/Entity/Event.php

68 lines
1.2 KiB
PHP
Raw Normal View History

2024-07-10 23:30:59 +02:00
<?php
namespace App\Entity;
use App\Repository\EventRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: EventRepository::class)]
class Event
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $action = null;
#[ORM\Column(type: Types::DATE_IMMUTABLE)]
private ?\DateTimeImmutable $date = null;
#[ORM\ManyToOne(inversedBy: 'events')]
#[ORM\JoinColumn(nullable: false)]
private ?Domain $domain = null;
public function getId(): ?int
{
return $this->id;
}
public function getAction(): ?string
{
return $this->action;
}
public function setAction(string $action): static
{
$this->action = $action;
return $this;
}
public function getDate(): ?\DateTimeImmutable
{
return $this->date;
}
public function setDate(\DateTimeImmutable $date): static
{
$this->date = $date;
return $this;
}
public function getDomain(): ?Domain
{
return $this->domain;
}
public function setDomain(?Domain $domain): static
{
$this->domain = $domain;
return $this;
}
}