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
+13
View File
@@ -0,0 +1,13 @@
import uuid
from fastapi import HTTPException, status
from sqlalchemy.orm import Session
from app.models.user import Student
def get_student_for_user(db: Session, student_id: uuid.UUID, user_id: uuid.UUID) -> Student:
student = db.get(Student, student_id)
if student is None or student.user_id != user_id:
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail="学生不存在")
return student