<?php
require_once __DIR__ . '/config.php';

echo "=== 数据库验证 ===\n\n";

$tables = [
    'users' => '用户表',
    'testimonials' => '评价表',
    'custom_categories' => '婚俗分类表',
    'custom_details' => '婚俗详情表',
    'budget_items' => '预算项目表',
    'wedding_checklist' => '婚礼清单表',
    'vendors' => '商家推荐表',
    'wedding_gallery' => '婚礼案例表',
    'wedding_day_schedule' => '婚礼当日流程表',
    'wedding_phase_videos' => '婚礼环节视频表',
    'video_assets' => '视频资产表'
];

foreach ($tables as $table => $name) {
    $stmt = $pdo->query("SELECT COUNT(*) as cnt FROM $table");
    $row = $stmt->fetch(PDO::FETCH_ASSOC);
    echo "$name ($table): {$row['cnt']} 条记录\n";
}

echo "\n=== 验证完成 ===\n";
?>