feat: new endpoints for users and updated models

This commit is contained in:
2025-07-18 02:58:22 +05:00
parent 733977f56e
commit 2e59d03784
10 changed files with 351 additions and 1 deletions

View 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