Eliminated the `RevokedToken` model and associated logic for managing token revocation. Removed unused files, related tests, and outdated dependencies in authentication modules. Simplified token decoding, user validation, and dependency injection by streamlining the flow and enhancing maintainability.
42 lines
1.4 KiB
Python
42 lines
1.4 KiB
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 user model
|
|
from .user import User
|
|
|
|
# Import event-related models
|
|
from .event import Event
|
|
from .event_manager import EventManager, EventManagerRole, init_event_owner
|
|
from .event_theme import EventTheme
|
|
from .event_media import EventMedia, MediaType, MediaPurpose
|
|
|
|
# Import guest and RSVP models
|
|
from .guest import Guest, GuestStatus, guest_gifts
|
|
from .rsvp import RSVP, RSVPStatus
|
|
|
|
# Import gift-related models
|
|
from .gift import (
|
|
GiftItem, GiftStatus, GiftPriority, GiftCategory,
|
|
GiftPurchase
|
|
)
|
|
|
|
# Import new models
|
|
from .email_template import EmailTemplate, TemplateType
|
|
from .notification_log import NotificationLog, NotificationType, NotificationStatus
|
|
from .activity_log import ActivityLog, ActivityType
|
|
# Make sure all models are imported above this line
|
|
__all__ = [
|
|
'Base', 'TimestampMixin', 'UUIDMixin',
|
|
'User',
|
|
'Event', 'EventManager', 'EventManagerRole', 'EventTheme', 'EventMedia','MediaType', 'MediaPurpose',
|
|
'Guest', 'GuestStatus', 'RSVP', 'RSVPStatus',
|
|
'GiftItem', 'GiftStatus', 'GiftPriority', 'GiftCategory', 'GiftPurchase',
|
|
'EmailTemplate', 'TemplateType',
|
|
'NotificationLog', 'NotificationType', 'NotificationStatus',
|
|
'ActivityLog', 'ActivityType',
|
|
] |