feat: new endpoints for users and updated models
This commit is contained in:
17
app/models/server/event.py
Normal file
17
app/models/server/event.py
Normal file
@ -0,0 +1,17 @@
|
||||
from pydantic import BaseModel
|
||||
from typing import Optional, List, Dict
|
||||
from datetime import datetime
|
||||
|
||||
class PlayerEvent(BaseModel):
|
||||
event_type: str
|
||||
player_id: Optional[str] = None
|
||||
player_name: str
|
||||
duration: Optional[int] = None # в секундах
|
||||
timestamp: Optional[int] = None # UNIX timestamp в миллисекундах
|
||||
server_ip: str
|
||||
|
||||
class OnlinePlayersUpdate(BaseModel):
|
||||
event_type: str = "online_players_update"
|
||||
players: List[Dict]
|
||||
timestamp: int
|
||||
server_ip: str
|
Reference in New Issue
Block a user