19 lines
805 B
Python
19 lines
805 B
Python
from pydantic import BaseModel, Field
|
|
|
|
|
|
class ServerInfoResponse(BaseModel):
|
|
process_id: int = Field(..., description="Идентификатор текущего процесса сервера")
|
|
parent_id: int = Field(..., description="Идентификатор родительского процесса")
|
|
cpu_cores: int = Field(..., description="Количество ядер процессора в системе")
|
|
memory_mb: float = Field(..., description="Общий объем оперативной памяти в мегабайтах")
|
|
|
|
class Config:
|
|
json_schema_extra = {
|
|
"example": {
|
|
"process_id": 12345,
|
|
"parent_id": 6789,
|
|
"cpu_cores": 8,
|
|
"memory_mb": 16384.5
|
|
}
|
|
}
|