src/Entity/StdPagesTracking.php line 20

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Admin\Entity\StdPages;
  4. use App\Admin\Entity\StdPagesTag;
  5. use App\Admin\Entity\StdWebUsers;
  6. use App\Repository\StdPagesTrackingRepository;
  7. use App\Repository\StdTagTrackingRepository;
  8. use Doctrine\ORM\Mapping as ORM;
  9. use App\Admin\Enum\TrackingEvent;
  10. #[ORM\Entity(repositoryClassStdPagesTrackingRepository::class)]
  11. #[ORM\Index(name'idx_tracking_id'columns: ['tracking_id'])]
  12. #[ORM\Index(name'idx_visited_at'columns: ['visited_at'])]
  13. #[ORM\Index(name'idx_hashed_ip'columns: ['hashed_ip'])]
  14. #[ORM\Index(name'idx_event'columns: ['event'])]
  15. #[ORM\Index(name'idx_tracking_page_event'columns: ['tracking_id''page_id''event'])]
  16. #[ORM\Index(name'idx_hashed_ip_visited'columns: ['hashed_ip''visited_at'])]
  17. class StdPagesTracking
  18. {
  19.     #[ORM\Id]
  20.     #[ORM\GeneratedValue]
  21.     #[ORM\Column]
  22.     private ?int $id null;
  23.     #[ORM\Column]
  24.     private ?\DateTimeImmutable $visitedAt null;
  25.     #[ORM\Column(length255nullabletrue)]
  26.     private ?string $sessionHash null;
  27.     #[ORM\Column(length255nullabletrue)]
  28.     private ?string $trackingId null;
  29.     #[ORM\ManyToOne(targetEntityStdPages::class, inversedBy'trackings')]
  30.     private ?StdPages $page null;
  31.     #[ORM\Column(length255)]
  32.     private ?string $hashedIp null;
  33.     #[ORM\Column(length255)]
  34.     private ?string $fingerprint null;
  35.     #[ORM\Column(length255nullabletrue)]
  36.     private ?string $country null;
  37.     #[ORM\Column(length255nullabletrue)]
  38.     private ?string $city null;
  39.     #[ORM\Column(length255nullabletrue)]
  40.     private ?string $preciseCountry null;
  41.     #[ORM\Column(length255nullabletrue)]
  42.     private ?string $preciseCity null;
  43.     #[ORM\ManyToOne(inversedBy'pageTrackings')]
  44.     private ?StdWebUsers $webUser null;
  45.     #[ORM\Column(name'event'type'string'length60nullabletrue,  options: ['default' => TrackingEvent::OpenPage->value])]
  46.     private ?string $event TrackingEvent::OpenPage->value;
  47.     public function getId(): ?int
  48.     {
  49.         return $this->id;
  50.     }
  51.     public function getVisitedAt(): ?\DateTimeImmutable
  52.     {
  53.         return $this->visitedAt;
  54.     }
  55.     public function setVisitedAt(\DateTimeImmutable $visitedAt): static
  56.     {
  57.         $this->visitedAt $visitedAt;
  58.         return $this;
  59.     }
  60.     public function getSessionHash(): ?string
  61.     {
  62.         return $this->sessionHash;
  63.     }
  64.     public function setSessionHash(?string $sessionHash): static
  65.     {
  66.         $this->sessionHash $sessionHash;
  67.         return $this;
  68.     }
  69.     public function getTrackingId(): ?string
  70.     {
  71.         return $this->trackingId;
  72.     }
  73.     public function setTrackingId(?string $trackingId): static
  74.     {
  75.         $this->trackingId $trackingId;
  76.         return $this;
  77.     }
  78.     public function getPage(): ?StdPages
  79.     {
  80.         return $this->page;
  81.     }
  82.     public function setPage(?StdPages $page): void
  83.     {
  84.         $this->page $page;
  85.     }
  86.     public function getHashedIp(): ?string
  87.     {
  88.         return $this->hashedIp;
  89.     }
  90.     public function setHashedIp(string $hashedIp): static
  91.     {
  92.         $this->hashedIp $hashedIp;
  93.         return $this;
  94.     }
  95.     public function getFingerprint(): ?string
  96.     {
  97.         return $this->fingerprint;
  98.     }
  99.     public function setFingerprint(string $fingerprint): static
  100.     {
  101.         $this->fingerprint $fingerprint;
  102.         return $this;
  103.     }
  104.     public function getCountry(): ?string
  105.     {
  106.         return $this->country;
  107.     }
  108.     public function setCountry(?string $country): static
  109.     {
  110.         $this->country $country;
  111.         return $this;
  112.     }
  113.     public function getCity(): ?string
  114.     {
  115.         return $this->city;
  116.     }
  117.     public function setCity(?string $city): static
  118.     {
  119.         $this->city $city;
  120.         return $this;
  121.     }
  122.     public function getPreciseCountry(): ?string
  123.     {
  124.         return $this->preciseCountry;
  125.     }
  126.     public function setPreciseCountry(?string $preciseCountry): void
  127.     {
  128.         $this->preciseCountry $preciseCountry;
  129.     }
  130.     public function getPreciseCity(): ?string
  131.     {
  132.         return $this->preciseCity;
  133.     }
  134.     public function setPreciseCity(?string $preciseCity): void
  135.     {
  136.         $this->preciseCity $preciseCity;
  137.     }
  138.     public function getWebUser(): ?StdWebUsers
  139.     {
  140.         return $this->webUser;
  141.     }
  142.     public function setWebUser(?StdWebUsers $webUser): static
  143.     {
  144.         $this->webUser $webUser;
  145.         return $this;
  146.     }
  147.     public function getEvent(): ?string
  148.     {
  149.         return $this->event;
  150.     }
  151.     public function setEvent(?string $event): self
  152.     {
  153.         $this->event $event;
  154.         return $this;
  155.     }
  156. }