Add background and foreground image URLs to event themes
All checks were successful
Build and Push Docker Images / changes (push) Successful in 4s
Build and Push Docker Images / build-backend (push) Successful in 50s
Build and Push Docker Images / build-frontend (push) Has been skipped

Extended the event theme schema to include `background_image_url`
This commit is contained in:
2025-03-12 16:20:12 +01:00
parent efb1dfd2a4
commit 288e09202d
2 changed files with 6 additions and 0 deletions

View File

@@ -8,8 +8,12 @@ class EventThemeBase(BaseModel):
name: str = Field(..., min_length=1) # Ensures name is not empty
description: Optional[str] = None
preview_image_url: Optional[str] = None
background_image_url: Optional[str] = None
foreground_image_url: Optional[str] = None
color_palette: Dict[str, str] = Field(..., min_items=1) # Ensures at least one color
asset_image_urls: Optional[Dict[str, str]] = None
fonts: Dict[str, str] = Field(..., min_items=1) # Ensures at least one font
is_active: bool = True
@field_validator('color_palette')
def validate_color_palette(cls, v):

View File

@@ -197,6 +197,8 @@ def event_theme_fixture(db_session):
name="Animal Theme",
description="An animal-themed design for events.",
preview_image_url="https://example.com/preview/animal_theme.jpg",
background_image_url="https://example.com/preview/animal_theme.jpg",
foreground_image_url="https://example.com/preview/animal_theme.jpg",
is_active=True,
color_palette={
"primary": "#ff5722",