```
Rename metadata fields for clarity and fix imports. Updated metadata-related field names across models to improve clarity and consistency (e.g., `metadata` to `media_metadata` and `notification_metadata`). Fixed an error in `guest_gifts` metadata reference and added a proper imports initialization in `__init__.py` for all models. ```
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
"""
|
||||
Models package initialization.
|
||||
Imports all models to ensure they're registered with SQLAlchemy.
|
||||
"""
|
||||
from .base import Base, 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',
|
||||
'Guest', 'GuestStatus', 'RSVP', 'RSVPStatus',
|
||||
'GiftItem', 'GiftStatus', 'GiftPriority', 'GiftCategory', 'GiftPurchase',
|
||||
'EmailTemplate', 'TemplateType',
|
||||
'NotificationLog', 'NotificationType', 'NotificationStatus',
|
||||
'ActivityLog', 'ActivityType',
|
||||
]
|
||||
Reference in New Issue
Block a user