Initial commit

This commit is contained in:
2025-12-04 22:24:47 +01:00
commit 453ce10494
106 changed files with 17145 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
"""Settings schemas."""
from pydantic import BaseModel
from typing import Optional, Any
from datetime import datetime
class SettingBase(BaseModel):
"""Base setting schema."""
key: str
value: Any
class SettingUpdate(BaseModel):
"""Schema for updating a setting."""
value: Any
class Setting(BaseModel):
"""Setting schema for responses."""
key: str
value: Any
updated_at: datetime
class Config:
from_attributes = True
@classmethod
def from_orm(cls, obj):
"""Custom from_orm to handle value extraction."""
return cls(
key=obj.key,
value=obj.get_value(),
updated_at=obj.updated_at
)