2026-07-03 01:06:35 +00:00

22 lines
522 B
Python

from pydantic import BaseModel
from typing import List
from datetime import datetime
class ArtistStat(BaseModel):
name: str
count: int
class AccountStatsResponse(BaseModel):
total_songs: int = 0
total_playlists: int = 0
total_listening_time: int = 0
top_artists: List[ArtistStat] = []
top_genres: List[ArtistStat] = []
top_moods: List[ArtistStat] = []
class ListeningHistoryItem(BaseModel):
song_id: str
title: str
artist: str
played_at: datetime
duration_played: int