Files
john 1aaef71f52 Initial commit: Happy Up monorepo through Sprint 5.
Document-driven MVP with FastAPI backend, Vue H5, WeChat mini shell, product demo, and Docker dev stack.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-23 11:42:40 +08:00

83 lines
2.2 KiB
Python

from datetime import date, datetime, timedelta, timezone
from app.schemas.models import Child, User, UserRole
MOCK_USER = User(id=1, phoneMasked="186****0000", role=UserRole.parent)
MOCK_CHILD = Child(
id=1001,
name="小明",
birthday=date(2016, 3, 15),
age=10,
height=142.5,
weight=36.0,
status="active",
)
MOCK_REPORT = {
"id": 2001,
"childId": 1001,
"taskId": 3001,
"riskLevel": "medium",
"summary": "建议关注头前伸与高低肩,开始针对性训练",
"metrics": [
{"name": "头前伸", "value": 78, "level": "medium", "confidence": 0.91},
{"name": "高低肩", "value": 65, "level": "low", "confidence": 0.88},
{"name": "骨盆倾斜", "value": 92, "level": "normal", "confidence": 0.94},
],
"recommendations": [
"每日肩胛稳定训练 5 分钟",
"颈后肌群拉伸 3 组",
"28 天后建议复测对比",
],
"disclaimer": "本报告用于健康管理建议,不构成医疗诊断。",
"reviewedBy": None,
}
MOCK_MOVEMENT_REPORT = {
"id": 2002,
"childId": 1001,
"taskId": 3002,
"taskType": "movement_scoring",
"score": 81,
"repsCompleted": 8,
"durationSeconds": 272,
"dimensions": {
"trajectory": 85,
"angle": 78,
"rhythm": 82,
"stability": 90,
"completion": 100,
},
"baselineCompare": {
"headNeckAngle": {"screening": 21, "current": 15, "delta": -6},
"shoulderDiffMm": {"screening": 12, "current": 6, "delta": -6},
},
"disclaimer": "本报告用于运动训练反馈,不构成医疗诊断。",
}
MOCK_PLAN = {
"id": 4001,
"status": "active",
"detail": {
"goal": "改善头前伸与高低肩",
"cycleDays": 28,
"currentDay": 3,
"exercises": [
{"id": 1, "name": "肩胛稳定训练", "durationMinutes": 5},
{"id": 2, "name": "颈后肌群拉伸", "sets": 3},
],
},
"startedAt": (datetime.now(timezone.utc) - timedelta(days=2)).isoformat(),
"endedAt": None,
}
MOCK_ADMIN_DASHBOARD = {
"newChildren": 12,
"uploadedVideos": 48,
"completedReports": 39,
"activePlans": 27,
"conversionRate": 0.22,
"reassessmentCompletionRate": 0.51,
}