forked from cardosofelipe/pragma-stack
- Introduced `user_sessions` table with support for per-device authentication sessions. - Added `UserSession` model, including fields for device metadata, IP, and session state. - Created schemas (`SessionBase`, `SessionCreate`, `SessionResponse`) to manage session data and responses. - Implemented utilities for extracting and parsing device information from HTTP requests. - Added Alembic migration to define `user_sessions` table with indexes for performance and cleanup.
16 lines
391 B
Python
16 lines
391 B
Python
"""
|
|
Models package initialization.
|
|
Imports all models to ensure they're registered with SQLAlchemy.
|
|
"""
|
|
# First import Base to avoid circular imports
|
|
from app.core.database import Base
|
|
from .base import TimestampMixin, UUIDMixin
|
|
|
|
# Import models
|
|
from .user import User
|
|
from .user_session import UserSession
|
|
|
|
__all__ = [
|
|
'Base', 'TimestampMixin', 'UUIDMixin',
|
|
'User', 'UserSession',
|
|
] |