Add background and foreground image URLs to event themes
Extended the event theme schema to include `background_image_url`
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user