Correcting schemas in database
This commit is contained in:
18
schemas.py
18
schemas.py
@@ -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
|
||||
Reference in New Issue
Block a user