2024-07-11 22:20:20 +02:00
|
|
|
<?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')]
|
2024-07-13 17:04:29 +02:00
|
|
|
#[ORM\JoinColumn(referencedColumnName: 'handle', nullable: false)]
|
2024-07-11 22:20:20 +02:00
|
|
|
private ?Entity $entity = null;
|
|
|
|
|
|
|
|
|
|
public function getEntity(): ?Entity
|
|
|
|
|
{
|
|
|
|
|
return $this->entity;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function setEntity(?Entity $entity): static
|
|
|
|
|
{
|
|
|
|
|
$this->entity = $entity;
|
|
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
|
}
|
|
|
|
|
}
|