<?php
require_once 'config.php';
global $pdo;
try {
    $sql = 'CREATE TABLE IF NOT EXISTS manager_audit (
        id INTEGER PRIMARY KEY AUTOINCREMENT,
        action VARCHAR(50) NOT NULL,
        details TEXT,
        created_at DATETIME DEFAULT CURRENT_TIMESTAMP
    )';
    $pdo->exec($sql);
    echo '审计日志表创建成功';
} catch(PDOException $e) {
    echo '创建失败: ' . $e->getMessage();
}
?>