- Remove committed .coverage and test-results/ (196K screenshots); gitignore them - Fix hardcoded /home/userpath + venv/bin/python in test_endpoints.py (relative backend dir + sys.executable) - Fix concatenated 'import json' in settings.py; bare excepts -> Exception; SQLAlchemy-safe is_active.is_(True); __all__ on models/schemas barrels - ruff clean (93 fixes), MIT LICENSE, PLAN.md -> docs/, README Tests section - 300 tests pass, 93.7% coverage
30 lines
670 B
Python
30 lines
670 B
Python
from pydantic import BaseModel, ConfigDict
|
|
from typing import List
|
|
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 |