first commit
This commit is contained in:
28
backend/app/schemas/dashboard.py
Normal file
28
backend/app/schemas/dashboard.py
Normal file
@@ -0,0 +1,28 @@
|
||||
from datetime import datetime
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class StorageStats(BaseModel):
|
||||
total: int
|
||||
used: int
|
||||
free: int
|
||||
folder_used: int
|
||||
usage_percent: float
|
||||
|
||||
|
||||
class OperationLogResponse(BaseModel):
|
||||
id: int
|
||||
message: str
|
||||
timestamp: datetime
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
|
||||
class DashboardResponse(BaseModel):
|
||||
routers_count: int
|
||||
export_count: int
|
||||
binary_count: int
|
||||
total_backups: int
|
||||
storage: StorageStats
|
||||
recent_logs: list[OperationLogResponse]
|
||||
Reference in New Issue
Block a user