Files
breakpilot-lehrer/klausur-service/backend/mail/mail_db.py
Benjamin Admin b6983ab1dc [split-required] Split 500-1000 LOC files across all services
backend-lehrer (5 files):
- alerts_agent/db/repository.py (992 → 5), abitur_docs_api.py (956 → 3)
- teacher_dashboard_api.py (951 → 3), services/pdf_service.py (916 → 3)
- mail/mail_db.py (987 → 6)

klausur-service (5 files):
- legal_templates_ingestion.py (942 → 3), ocr_pipeline_postprocess.py (929 → 4)
- ocr_pipeline_words.py (876 → 3), ocr_pipeline_ocr_merge.py (616 → 2)
- KorrekturPage.tsx (956 → 6)

website (5 pages):
- mail (985 → 9), edu-search (958 → 8), mac-mini (950 → 7)
- ocr-labeling (946 → 7), audit-workspace (871 → 4)

studio-v2 (5 files + 1 deleted):
- page.tsx (946 → 5), MessagesContext.tsx (925 → 4)
- korrektur (914 → 6), worksheet-cleanup (899 → 6)
- useVocabWorksheet.ts (888 → 3)
- Deleted dead page-original.tsx (934 LOC)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-24 23:35:37 +02:00

71 lines
1.4 KiB
Python

"""
Unified Inbox Mail Database Service
Barrel re-export -- the actual logic lives in:
- mail_db_pool.py: Connection pool and schema initialization
- mail_db_accounts.py: Email account CRUD
- mail_db_emails.py: Aggregated email operations
- mail_db_tasks.py: Inbox task operations
- mail_db_stats.py: Statistics and audit log
"""
from .mail_db_pool import get_pool, init_mail_tables
from .mail_db_accounts import (
create_email_account,
get_email_accounts,
get_email_account,
update_account_status,
delete_email_account,
)
from .mail_db_emails import (
upsert_email,
get_unified_inbox,
get_email,
update_email_ai_analysis,
mark_email_read,
mark_email_starred,
)
from .mail_db_tasks import (
create_task,
get_tasks,
get_task,
update_task,
get_task_dashboard_stats,
)
from .mail_db_stats import (
get_mail_stats,
log_mail_audit,
)
__all__ = [
# Pool
"get_pool",
"init_mail_tables",
# Accounts
"create_email_account",
"get_email_accounts",
"get_email_account",
"update_account_status",
"delete_email_account",
# Emails
"upsert_email",
"get_unified_inbox",
"get_email",
"update_email_ai_analysis",
"mark_email_read",
"mark_email_starred",
# Tasks
"create_task",
"get_tasks",
"get_task",
"update_task",
"get_task_dashboard_stats",
# Stats
"get_mail_stats",
"log_mail_audit",
]