30 lines
686 B
Python
30 lines
686 B
Python
from pydantic import BaseModel, ConfigDict
|
|
from typing import Optional, List, Dict
|
|
from datetime import datetime
|
|
from .song import SongResponse
|
|
|
|
class MoodCategoryResponse(BaseModel):
|
|
model_config = ConfigDict(from_attributes=True)
|
|
id: str
|
|
name: str
|
|
color_hex: str
|
|
description: str
|
|
background_image: str
|
|
icon_path: str
|
|
|
|
class MoodScore(BaseModel):
|
|
mood: str
|
|
score: float
|
|
keywords: List[str]
|
|
|
|
class MoodAnalysisResponse(BaseModel):
|
|
song_id: str
|
|
scores: List[MoodScore]
|
|
top_mood: str
|
|
confidence: float
|
|
analyzed_at: datetime
|
|
|
|
class MoodPlaylistResponse(BaseModel):
|
|
mood: str
|
|
songs: List[SongResponse]
|
|
total_songs: int |