mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
30 lines
664 B
PHP
30 lines
664 B
PHP
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use App\Repository\DomainEventRepository;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
#[ORM\Entity(repositoryClass: DomainEventRepository::class)]
|
|
#[ORM\UniqueConstraint(
|
|
columns: ['action', 'date', 'domain_id']
|
|
)]
|
|
class DomainEvent extends Event
|
|
{
|
|
#[ORM\ManyToOne(targetEntity: Domain::class, inversedBy: 'events')]
|
|
#[ORM\JoinColumn(referencedColumnName: 'ldh_name', nullable: false)]
|
|
private ?Domain $domain = null;
|
|
|
|
public function getDomain(): ?Domain
|
|
{
|
|
return $this->domain;
|
|
}
|
|
|
|
public function setDomain(?Domain $domain): static
|
|
{
|
|
$this->domain = $domain;
|
|
|
|
return $this;
|
|
}
|
|
}
|