mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-26 14:15:45 +00:00
27 lines
614 B
PHP
27 lines
614 B
PHP
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use App\Repository\DomainEventRepository;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
#[ORM\Entity(repositoryClass: DomainEventRepository::class)]
|
|
class DomainEvent extends Event
|
|
{
|
|
#[ORM\ManyToOne(targetEntity: Domain::class, cascade: ['persist'], 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;
|
|
}
|
|
}
|