2025-04-12 10:38:12 +02:00
|
|
|
from pydantic import BaseModel
|
2025-04-12 21:36:09 +02:00
|
|
|
from typing import Dict, Optional, Any, Literal
|
2025-04-12 01:18:07 +02:00
|
|
|
from uuid import UUID
|
|
|
|
|
|
|
|
|
2025-04-12 10:38:12 +02:00
|
|
|
class GameStartResponseDTO(BaseModel):
|
2025-04-12 01:18:07 +02:00
|
|
|
"""Response model for a new game started."""
|
|
|
|
message: str
|
|
|
|
session_id: UUID
|
|
|
|
player_id: str
|
|
|
|
client_id: UUID
|
|
|
|
client_data: Dict[str, Any]
|
|
|
|
score: int
|
|
|
|
|
2025-04-12 21:36:09 +02:00
|
|
|
class GameStartResponseWithBotDecisionDTO(BaseModel):
|
2025-04-12 21:57:05 +02:00
|
|
|
"""Response model to send to frontend after a new game started."""
|
2025-04-12 21:36:09 +02:00
|
|
|
message: str
|
|
|
|
session_id: UUID
|
|
|
|
player_id: str
|
|
|
|
client_id: UUID
|
|
|
|
client_data: Dict[str, Any]
|
|
|
|
score: int
|
|
|
|
bot_decision: Literal["Accept", "Reject"]
|
2025-04-13 07:24:04 +02:00
|
|
|
bot_reason: Optional[str]
|
2025-04-12 21:36:09 +02:00
|
|
|
|
2025-04-12 01:18:07 +02:00
|
|
|
|
2025-04-12 10:38:12 +02:00
|
|
|
class GameDecisionResponseDTO(BaseModel):
|
2025-04-12 01:18:07 +02:00
|
|
|
"""Response model for a game decision result."""
|
|
|
|
status: str
|
|
|
|
score: int
|
|
|
|
client_id: Optional[UUID] = None
|
|
|
|
client_data: Optional[Dict[str, Any]] = None
|
2025-04-12 21:57:05 +02:00
|
|
|
|
|
|
|
class GameDecisionResponseWithBotDecisionDTO(BaseModel):
|
|
|
|
"""Response model to send to frontend after a game decision has been sent."""
|
|
|
|
status: str
|
|
|
|
score: int
|
|
|
|
client_id: Optional[UUID] = None
|
|
|
|
client_data: Optional[Dict[str, Any]] = None
|
|
|
|
bot_decision: Literal["Accept", "Reject"]
|
2025-04-13 08:45:47 +02:00
|
|
|
bot_reason: Optional[str]
|