feat(01-01): create email blueprint with encrypted Tortoise ORM models

- Add EncryptedTextField for transparent Fernet encryption
- Create EmailAccount model with encrypted IMAP credentials
- Create EmailSyncStatus model for sync state tracking
- Create Email model with 30-day retention logic
- Follow existing blueprint patterns from users/conversation
This commit is contained in:
2026-02-08 09:08:32 -05:00
parent 800c6fef7f
commit bee63d1c60
3 changed files with 200 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
"""
Email blueprint for IMAP email ingestion.
Provides API endpoints for managing email accounts and querying email content.
Admin-only access enforced via lldap_admin group membership.
"""
from quart import Blueprint
# Import models for Tortoise ORM registration
from . import models # noqa: F401
# Create blueprint
email_blueprint = Blueprint("email", __name__, url_prefix="/api/email")
# Routes will be added in Phase 2