Correcting schemas in database

This commit is contained in:
2025-11-17 14:17:30 +01:00
parent 589ac73b25
commit 0fa46d4cca
2 changed files with 26 additions and 13 deletions

View File

@@ -1,5 +1,19 @@
from pydantic import BaseModel
from typing import Literal
class SettingsUpdate(BaseModel):
overlay_theme: Literal['dark-purple', 'bright-green', 'minimal-light', 'hacker-green']
overlay_theme: str
class CustomThemeBase(BaseModel):
name: str
css_content: str
class CustomThemeCreate(CustomThemeBase):
pass
class CustomTheme(CustomThemeBase):
id: int
owner_id: int
class Config:
# This allows the Pydantic model to be created from a SQLAlchemy ORM object
orm_mode = True