Add result endpoints

This commit is contained in:
Esa Kataja
2025-05-15 19:16:08 +03:00
parent a0344903ec
commit e560809c25
2 changed files with 45 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
from pydantic import BaseModel, Field
class Result(BaseModel):
song_id: int = Field(description="ID of the song", examples=[1])
total_reviews: int = Field(0, description="Total number of reviews", examples=[10])
avg_score_song: float = Field(
description="Average score for song quality", examples=[85.5]
)
avg_score_show: float = Field(
description="Average score for stage show", examples=[82.3]
)
avg_score_costume: float = Field(
description="Average score for wardrobe/costumes", examples=[88.1]
)
avg_total_score: float = Field(description="Average total score", examples=[85.5])
class TeamResult(Result):
team_id: int = Field(description="ID of the team", examples=[1])