mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
feat: add id column on entity
This commit is contained in:
@@ -7,12 +7,12 @@ use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity(repositoryClass: EntityEventRepository::class)]
|
||||
#[ORM\UniqueConstraint(
|
||||
columns: ['action', 'date', 'entity_id']
|
||||
columns: ['action', 'date', 'entity_uid']
|
||||
)]
|
||||
class EntityEvent extends Event
|
||||
{
|
||||
#[ORM\ManyToOne(targetEntity: Entity::class, inversedBy: 'events')]
|
||||
#[ORM\JoinColumn(referencedColumnName: 'handle', nullable: false)]
|
||||
#[ORM\JoinColumn(name: 'entity_uid', referencedColumnName: 'id', nullable: false)]
|
||||
private ?Entity $entity = null;
|
||||
|
||||
public function getEntity(): ?Entity
|
||||
|
||||
Reference in New Issue
Block a user