<?php

namespace App\Models;

class Log extends BaseModel
{
    public function record(string $action, int $userId, ?string $payload = null): void
    {
        $stmt = $this->pdo->prepare('INSERT INTO logs (user_id, action, payload) 
            VALUES (:user_id, :action, :payload)');
        $stmt->execute([
            'user_id' => $userId,
            'action' => $action,
            'payload' => $payload,
        ]);
    }
}

