Initial commit: secondary school grade archive system.

Add FastAPI/React app with Docker deployment, Ubuntu one-click install, and docs for junior/senior high score tracking and mistake bank.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-28 11:18:58 +08:00
commit e329d3398a
76 changed files with 8506 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
from app.models.user import SchoolLevel
SCHOOL_LEVEL_LABELS: dict[SchoolLevel, str] = {
SchoolLevel.junior_high: "初中",
SchoolLevel.senior_high: "高中",
}
def school_level_label(level: SchoolLevel | str | None) -> str:
if level is None:
return "初中"
if isinstance(level, str):
try:
level = SchoolLevel(level)
except ValueError:
return "初中"
return SCHOOL_LEVEL_LABELS.get(level, "初中")