mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
27 lines
590 B
PHP
27 lines
590 B
PHP
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use App\Repository\EntityEventRepository;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
#[ORM\Entity(repositoryClass: EntityEventRepository::class)]
|
|
class EntityEvent extends Event
|
|
{
|
|
#[ORM\ManyToOne(targetEntity: Entity::class, inversedBy: 'events')]
|
|
#[ORM\JoinColumn(referencedColumnName: 'handle', nullable: false)]
|
|
private ?Entity $entity = null;
|
|
|
|
public function getEntity(): ?Entity
|
|
{
|
|
return $this->entity;
|
|
}
|
|
|
|
public function setEntity(?Entity $entity): static
|
|
{
|
|
$this->entity = $entity;
|
|
|
|
return $this;
|
|
}
|
|
}
|