-- ========================================
-- 查看礼物表的详细结构和数据
-- ========================================

-- 1. 查看 eb_gift 表结构
SHOW FULL COLUMNS FROM eb_gift;

-- 2. 查看 eb_gift_config 表结构
SHOW FULL COLUMNS FROM eb_gift_config;

-- 3. 查看 eb_gift 现有数据
SELECT * FROM eb_gift LIMIT 10;

-- 4. 查看 eb_gift_config 现有数据
SELECT * FROM eb_gift_config LIMIT 10;

-- 5. 统计礼物数量
SELECT 
    '=== 礼物统计 ===' as section,
    COUNT(*) as total_gifts,
    SUM(CASE WHEN status = 1 THEN 1 ELSE 0 END) as enabled_gifts,
    SUM(CASE WHEN status = 0 THEN 1 ELSE 0 END) as disabled_gifts
FROM eb_gift;

-- 6. 统计礼物配置数量
SELECT 
    '=== 礼物配置统计 ===' as section,
    COUNT(*) as total_configs
FROM eb_gift_config;
