from typing import Optional from datetime import datetime from ninja import Schema class NoitaSubmissionOut(Schema): id: str user_id: Optional[int] username: Optional[str] file_size: int content_type: str created_at: datetime processed: bool class ObjectivResultOut(Schema): objectiv_id: str first_seen_at: datetime seed: str points_per_objectiv: int total_points: int class ResultsOut(Schema): total_score: int deaths_count: int objectives: list[ObjectivResultOut] class LeaderboardEntryOut(Schema): rank: int username: str is_staff: bool total_score: int objectives_count: int deaths_count: int class LeaderboardOut(Schema): leaderboard: list[LeaderboardEntryOut]