"""Track request/response schemas."""

import datetime as dt
import uuid

from pydantic import BaseModel


class TrackOut(BaseModel):
    id: uuid.UUID
    title: str
    artist_id: uuid.UUID
    artist_name: str
    album_id: uuid.UUID | None
    album_title: str | None
    duration_seconds: int | None
    file_format: str
    file_size: int
    metadata_status: str
    metadata_error: str | None
    enriched_at: dt.datetime | None
    source: str
    has_cover: bool
    created_at: dt.datetime


class TrackUpdate(BaseModel):
    title: str | None = None
    genre: str | None = None
    year: int | None = None
