Files
breakpilot-lehrer/klausur-service/backend/storage.py
Benjamin Boenisch 5a31f52310 Initial commit: breakpilot-lehrer - Lehrer KI Platform
Services: Admin-Lehrer, Backend-Lehrer, Studio v2, Website,
Klausur-Service, School-Service, Voice-Service, Geo-Service,
BreakPilot Drive, Agent-Core

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 23:47:26 +01:00

62 lines
1.6 KiB
Python

"""
Klausur-Service In-Memory Storage
Centralized storage for all in-memory data.
Note: In production, this should be replaced with a database.
"""
from typing import Dict, List
from models.exam import Klausur, StudentKlausur
from models.grading import AuditLogEntry
from models.eh import (
Erwartungshorizont,
EHRightsConfirmation,
EHAuditLogEntry,
EHKeyShare,
EHKlausurLink,
EHShareInvitation,
)
# =============================================
# KLAUSUR STORAGE
# =============================================
# Klausur storage: klausur_id -> Klausur
klausuren_db: Dict[str, Klausur] = {}
# Student work storage: student_id -> StudentKlausur
students_db: Dict[str, StudentKlausur] = {}
# Examiner assignments: student_id -> examiner info
examiner_db: Dict[str, Dict] = {}
# =============================================
# AUDIT LOG STORAGE
# =============================================
# General audit log
audit_log_db: List[AuditLogEntry] = []
# =============================================
# BYOEH STORAGE
# =============================================
# Erwartungshorizont storage: eh_id -> Erwartungshorizont
eh_db: Dict[str, Erwartungshorizont] = {}
# Rights confirmations: confirmation_id -> EHRightsConfirmation
eh_rights_db: Dict[str, EHRightsConfirmation] = {}
# EH audit log
eh_audit_db: List[EHAuditLogEntry] = []
# Key shares: eh_id -> list of EHKeyShare
eh_key_shares_db: Dict[str, List[EHKeyShare]] = {}
# EH-Klausur links: klausur_id -> list of EHKlausurLink
eh_klausur_links_db: Dict[str, List[EHKlausurLink]] = {}
# Share invitations: invitation_id -> EHShareInvitation
eh_invitations_db: Dict[str, EHShareInvitation] = {}