<?php

declare(strict_types=1);

namespace App\Framework\Analytics\Events;

/**
 * Event für Seitenaufrufe
 */
final readonly class PageView
{
    public function __construct(
        public string $path,
        public string $title = '',
        public string $referer = '',
        public array $properties = [],
        public string $sessionId = '',
        public float $timestamp = -1
    ) {
        if ($this->timestamp === -1) {
            $this->timestamp = microtime(true);
        }
    }
}
