src/Entity/History.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Traits\TimestampableTrait;
  4. use App\Repository\HistoryRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassHistoryRepository::class)]
  7. class History
  8. {
  9.     use TimestampableTrait;
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type'integer')]
  13.     private $id;
  14.     #[ORM\ManyToOne(targetEntityUser::class, inversedBy'histories')]
  15.     #[ORM\JoinColumn(nullablefalse)]
  16.     private $user;
  17.     #[ORM\Column(type'string'length255)]
  18.     private $event;
  19.     #[ORM\Column(type'string'length255nullabletrue)]
  20.     private $entityType;
  21.     #[ORM\Column(type'integer'nullabletrue)]
  22.     private $entityId;
  23.     #[ORM\Column(type'integer'nullabletrue)]
  24.     private $counter;
  25.     public function getId(): ?int
  26.     {
  27.         return $this->id;
  28.     }
  29.     public function getUser(): ?User
  30.     {
  31.         return $this->user;
  32.     }
  33.     public function setUser(?User $user): self
  34.     {
  35.         $this->user $user;
  36.         return $this;
  37.     }
  38.     public function getEvent(): ?string
  39.     {
  40.         return $this->event;
  41.     }
  42.     public function setEvent(string $event): self
  43.     {
  44.         $this->event $event;
  45.         return $this;
  46.     }
  47.     public function getEntityType(): ?string
  48.     {
  49.         return $this->entityType;
  50.     }
  51.     public function setEntityType(?string $entityType): self
  52.     {
  53.         $this->entityType $entityType;
  54.         return $this;
  55.     }
  56.     public function getEntityId(): ?int
  57.     {
  58.         return $this->entityId;
  59.     }
  60.     public function setEntityId(?int $entityId): self
  61.     {
  62.         $this->entityId $entityId;
  63.         return $this;
  64.     }
  65.     public function getCounter(): ?int
  66.     {
  67.         return $this->counter;
  68.     }
  69.     public function setCounter(?int $counter): self
  70.     {
  71.         $this->counter $counter;
  72.         return $this;
  73.     }
  74. }