<?php
namespace App\Entity;
use App\Entity\Traits\TimestampableTrait;
use App\Repository\HistoryRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: HistoryRepository::class)]
class History
{
use TimestampableTrait;
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\ManyToOne(targetEntity: User::class, inversedBy: 'histories')]
#[ORM\JoinColumn(nullable: false)]
private $user;
#[ORM\Column(type: 'string', length: 255)]
private $event;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $entityType;
#[ORM\Column(type: 'integer', nullable: true)]
private $entityId;
#[ORM\Column(type: 'integer', nullable: true)]
private $counter;
public function getId(): ?int
{
return $this->id;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function getEvent(): ?string
{
return $this->event;
}
public function setEvent(string $event): self
{
$this->event = $event;
return $this;
}
public function getEntityType(): ?string
{
return $this->entityType;
}
public function setEntityType(?string $entityType): self
{
$this->entityType = $entityType;
return $this;
}
public function getEntityId(): ?int
{
return $this->entityId;
}
public function setEntityId(?int $entityId): self
{
$this->entityId = $entityId;
return $this;
}
public function getCounter(): ?int
{
return $this->counter;
}
public function setCounter(?int $counter): self
{
$this->counter = $counter;
return $this;
}
}