refactor: split schemas.py into schemas/ package
This commit is contained in:
32
backend/schemas/common.py
Normal file
32
backend/schemas/common.py
Normal file
@@ -0,0 +1,32 @@
|
||||
from pydantic import BaseModel
|
||||
from typing import Optional, List
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
# --- System Settings ---
|
||||
class SystemSettingBase(BaseModel):
|
||||
key: str
|
||||
value: str
|
||||
|
||||
|
||||
class SystemSetting(SystemSettingBase):
|
||||
class Config:
|
||||
from_attributes = True
|
||||
|
||||
|
||||
# --- Database Management ---
|
||||
class BackupInfo(BaseModel):
|
||||
filename: str
|
||||
size_bytes: int
|
||||
created_at: datetime
|
||||
|
||||
|
||||
class DatabaseStats(BaseModel):
|
||||
backup_count: int
|
||||
total_size_bytes: int
|
||||
|
||||
|
||||
class DbSettingsUpdate(BaseModel):
|
||||
retention_count: int
|
||||
schedule_hour: int
|
||||
schedule_freq_days: int
|
||||
Reference in New Issue
Block a user