from typing import Dict from sqlalchemy import Column, String, JSON, Boolean from sqlalchemy.ext.mutable import MutableDict from sqlalchemy.orm import relationship from .base import Base, TimestampMixin, UUIDMixin class EventTheme(Base, UUIDMixin, TimestampMixin): __tablename__ = 'event_themes' name = Column(String, nullable=False) description = Column(String) preview_image_url = Column(String) background_image_url = Column(String, nullable=True) foreground_image_url = Column(String, nullable=True) asset_image_urls: Dict[str, str] = Column(MutableDict.as_mutable(JSON), default=dict) color_palette = Column(JSON, nullable=False) fonts = Column(JSON, nullable=False) is_active = Column(Boolean, default=True, nullable=False) # Relationship with Event events = relationship("Event", back_populates="theme") def __repr__(self): return f""