from __future__ import annotations

from typing import Any, Literal

from pydantic import BaseModel, Field


class TrendInput(BaseModel):
    query: str = Field(min_length=1, max_length=40)
    trade_date: str = Field(min_length=10, max_length=10)
    manual: dict[str, Any] = Field(default_factory=dict)


class FortuneInput(BaseModel):
    trade_date: str = Field(min_length=10, max_length=10)


class HeartLineInput(BaseModel):
    trade_date: str = Field(min_length=10, max_length=10)
    values: list[Literal[6, 7, 8, 9]] = Field(default_factory=list, max_length=5)


class HeartCompleteInput(BaseModel):
    trade_date: str = Field(min_length=10, max_length=10)
    values: list[Literal[6, 7, 8, 9]] = Field(min_length=6, max_length=6)
    first_thought_confirmed: bool


class InterpretInput(BaseModel):
    reading_id: int = Field(gt=0)


class DeleteResponse(BaseModel):
    deleted: int
