<?php
require_once 'config.php';

// 插入测试数据
$pdo->exec("INSERT INTO video_assets (video_id, video_name, video_type, storage_path, file_name, duration, format, is_active) VALUES 
    ('opening_sample', '婚礼片头演示视频', 'opening', 'videos/opening/', 'opening_sample.mp4', 15, 'mp4', 1),
    ('host_sample', '司仪数字人演示视频', 'host', 'videos/host/', 'host_sample.mp4', 120, 'mp4', 1)");

echo "已插入测试数据\n";

// 查询当前记录
$stmt = $pdo->query("SELECT video_id, video_name, video_type, is_active FROM video_assets");
echo "\n当前视频记录:\n";
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
    echo "ID: {$row['video_id']} | 名称: {$row['video_name']} | 类型: {$row['video_type']} | 活跃: {$row['is_active']}\n";
}
?>