src/Entity/Log.php line 11

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\LogRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Gedmo\Mapping\Annotation as Gedmo;
  7. #[ORM\Entity(repositoryClassLogRepository::class)]
  8. class Log
  9. {
  10.   #[ORM\Id]
  11.   #[ORM\GeneratedValue]
  12.   #[ORM\Column(type'integer')]
  13.   private $id;
  14.   #[Gedmo\Timestampable(on'create')]
  15.   #[ORM\Column(type'datetime_immutable')]
  16.   private $createdAt;
  17.   #[ORM\Column(type'integer'nullabletrue)]
  18.   private $userId;
  19.   #[ORM\Column(type'boolean')]
  20.   private bool $isPublic false;
  21.   #[ORM\Column(type'string'length255)]
  22.   private int $type 0;
  23.   #[ORM\Column(type'text'nullabletrue)]
  24.   private $content;
  25.   #[ORM\Column(type'integer'nullabletrue)]
  26.   private ?int $entityId 10;
  27.   #[ORM\Column(type'string'length255nullabletrue)]
  28.   private ?string $entityType "";
  29.   #[ORM\Column(type'array'nullabletrue)]
  30.   private $viewedBy = [];
  31.   public function getId(): ?int
  32.   {
  33.     return $this->id;
  34.   }
  35.   public function getCreatedAt(): ?\DateTimeImmutable
  36.   {
  37.     return $this->createdAt;
  38.   }
  39.   public function setCreatedAt(\DateTimeImmutable $createdAt): self
  40.   {
  41.     $this->createdAt $createdAt;
  42.     return $this;
  43.   }
  44.   public function getUserId(): ?int
  45.   {
  46.     return $this->userId;
  47.   }
  48.   public function setUserId(?int $userId): self
  49.   {
  50.     $this->userId $userId;
  51.     return $this;
  52.   }
  53.   public function isIsPublic(): ?bool
  54.   {
  55.     return $this->isPublic;
  56.   }
  57.   public function setIsPublic(bool $isPublic): self
  58.   {
  59.     $this->isPublic $isPublic;
  60.     return $this;
  61.   }
  62.   public function getType(): ?string
  63.   {
  64.     return $this->type;
  65.   }
  66.   public function setType(string $type): self
  67.   {
  68.     $this->type $type;
  69.     return $this;
  70.   }
  71.   public function getContent(): ?string
  72.   {
  73.     return $this->content;
  74.   }
  75.   public function setContent(?string $content): self
  76.   {
  77.     $this->content $content;
  78.     return $this;
  79.   }
  80.   public function getEntityId(): ?int
  81.   {
  82.     return $this->entityId;
  83.   }
  84.   public function setEntityId(?int $entityId): self
  85.   {
  86.     $this->entityId $entityId;
  87.     return $this;
  88.   }
  89.   public function getEntityType(): ?string
  90.   {
  91.     return $this->entityType;
  92.   }
  93.   public function setEntityType(?string $entityType): self
  94.   {
  95.     $this->entityType $entityType;
  96.     return $this;
  97.   }
  98.   public function getViewedBy(): array
  99.   {
  100.     return $this->viewedBy;
  101.   }
  102.   public function setViewedBy(?array $viewedBy): self
  103.   {
  104.     $this->viewedBy $viewedBy;
  105.     return $this;
  106.   }
  107. }