-- 检查teacher表数据
-- 用于验证是否有教师数据可以显示

-- 查看教师总数
SELECT COUNT(*) as teacher_count FROM teacher;

-- 查看已审核的教师数量
SELECT COUNT(*) as approved_teacher_count 
FROM teacher 
WHERE audit_status = 1;

-- 查看教师列表（前10条）
SELECT 
    id,
    name,
    real_name,
    teacher_name,
    phone,
    audit_status,
    status,
    teacher_level,
    subject,
    area,
    grade,
    create_time
FROM teacher
ORDER BY create_time DESC
LIMIT 10;

-- 查看各审核状态的教师数量
SELECT 
    audit_status,
    COUNT(*) as count,
    CASE 
        WHEN audit_status = 0 THEN '待审核'
        WHEN audit_status = 1 THEN '已通过'
        WHEN audit_status = 2 THEN '已拒绝'
        ELSE '未知状态'
    END as status_name
FROM teacher
GROUP BY audit_status;
