Add is_active field to EventTheme model and test fixture.

The `is_active` field was introduced to the `EventTheme` model to indicate whether a theme is active. The corresponding test fixture in `conftest.py` was updated to include this new field, ensuring consistency in tests. This change enhances flexibility for managing event themes.
This commit is contained in:
2025-03-12 15:21:28 +01:00
parent a0d472f583
commit 525d1b8012
3 changed files with 287 additions and 267 deletions

View File

@@ -1,4 +1,4 @@
from sqlalchemy import Column, String, JSON
from sqlalchemy import Column, String, JSON, Boolean
from sqlalchemy.orm import relationship
from .base import Base, TimestampMixin, UUIDMixin
@@ -11,6 +11,7 @@ class EventTheme(Base, UUIDMixin, TimestampMixin):
preview_image_url = Column(String)
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")