src/Entity/PDFAccessLog.php line 11

Open in your IDE?
  1. <?php
  2. // src/Entity/PDFAccessLog.php
  3. namespace App\Entity;
  4. use App\Repository\PDFAccessLogRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassPDFAccessLogRepository::class)]
  7. #[ORM\Table(name'pdf_access_log')]
  8. class PDFAccessLog
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\ManyToOne(inversedBy'pDFAccessLogs')]
  15.     #[ORM\JoinColumn(nullabletrue)]
  16.     private ?Support $support null;
  17.     #[ORM\ManyToOne(inversedBy'pDFAccessLogs')]
  18.     #[ORM\JoinColumn(nullabletrue)]
  19.     private ?User $user null;
  20.     #[ORM\Column(length45nullabletrue)]
  21.     private ?string $ip null;
  22.     #[ORM\Column(type'text'nullabletrue)]
  23.     private ?string $userAgent null;
  24.     // CORRECTION : Ajouter le type explicitement
  25.     #[ORM\Column(type'datetime'nullablefalse)]
  26.     private ?\DateTimeInterface $accessedAt null;
  27.     #[ORM\Column(type'text'nullabletrue)]
  28.     private ?string $suspiciousActivities null;
  29.     #[ORM\Column(nullabletrue)]
  30.     private ?int $pageCount null;
  31.     public function getId(): ?int
  32.     {
  33.         return $this->id;
  34.     }
  35.     public function getSupport(): ?Support
  36.     {
  37.         return $this->support;
  38.     }
  39.     public function setSupport(?Support $support): self
  40.     {
  41.         $this->support $support;
  42.         return $this;
  43.     }
  44.     public function getUser(): ?User
  45.     {
  46.         return $this->user;
  47.     }
  48.     public function setUser(?User $user): self
  49.     {
  50.         $this->user $user;
  51.         return $this;
  52.     }
  53.     public function getIp(): ?string
  54.     {
  55.         return $this->ip;
  56.     }
  57.     public function setIp(?string $ip): self
  58.     {
  59.         $this->ip $ip;
  60.         return $this;
  61.     }
  62.     public function getUserAgent(): ?string
  63.     {
  64.         return $this->userAgent;
  65.     }
  66.     public function setUserAgent(?string $userAgent): self
  67.     {
  68.         $this->userAgent $userAgent;
  69.         return $this;
  70.     }
  71.     public function getAccessedAt(): ?\DateTimeInterface
  72.     {
  73.         return $this->accessedAt;
  74.     }
  75.     public function setAccessedAt(\DateTimeInterface $accessedAt): self
  76.     {
  77.         $this->accessedAt $accessedAt;
  78.         return $this;
  79.     }
  80.     public function getSuspiciousActivities(): ?string
  81.     {
  82.         return $this->suspiciousActivities;
  83.     }
  84.     public function setSuspiciousActivities(?string $suspiciousActivities): self
  85.     {
  86.         $this->suspiciousActivities $suspiciousActivities;
  87.         return $this;
  88.     }
  89.     public function getPageCount(): ?int
  90.     {
  91.         return $this->pageCount;
  92.     }
  93.     public function setPageCount(?int $pageCount): self
  94.     {
  95.         $this->pageCount $pageCount;
  96.         return $this;
  97.     }
  98. }