<?php

declare(strict_types=1);

namespace App\Framework\Analytics\Events;

use App\Framework\Analytics\AnalyticsCategory;

/**
 * Event für Benutzeraktionen
 */
final readonly class UserAction
{
    public function __construct(
        public string $action,
        public AnalyticsCategory $category,
        public array $properties = [],
        public string $sessionId = '',
        public float $timestamp = -1
    ) {
        if ($this->timestamp === -1) {
            $this->timestamp = microtime(true);
        }
    }
}
