from fastapi import APIRouter, Depends from app.core.security import get_current_user router = APIRouter(prefix="/exam/chapter", tags=["学习-章节"]) @router.get("/tree") async def get_chapter_tree(user: dict = Depends(get_current_user)): return { "subjects": [ { "id": "yao1", "name": "药学专业知识一", "chapters": [ {"id": "ch01", "name": "药品与药品质量标准", "knowledge_count": 0}, {"id": "ch02", "name": "药物的结构与作用", "knowledge_count": 0}, ], }, { "id": "yao2", "name": "药学专业知识二", "chapters": [ {"id": "ch01", "name": "精神与中枢神经系统疾病用药", "knowledge_count": 0}, ], }, { "id": "fagui", "name": "药事管理与法规", "chapters": [ {"id": "ch01", "name": "执业药师与健康中国战略", "knowledge_count": 0}, ], }, { "id": "zonghe", "name": "药学综合知识与技能", "chapters": [ {"id": "ch01", "name": "执业药师与药学服务", "knowledge_count": 0}, ], }, ] } @router.get("/{chapter_id}") async def get_chapter_knowledge( chapter_id: str, user: dict = Depends(get_current_user), ): return { "chapter_id": chapter_id, "knowledge_points": [], "message": "待数据入库后可用", }