"""Ticker request/response schemas.""" from datetime import date, datetime from pydantic import BaseModel, Field class TickerCreate(BaseModel): symbol: str = Field(..., description="NASDAQ ticker symbol (e.g. AAPL)") class TickerResponse(BaseModel): id: int symbol: str name: str | None = None created_at: datetime # NULL == actively traded. Delisted symbols stay in the registry with their # history and are excluded from signals — the date is what makes that # visible instead of the row silently disappearing. delisted_on: date | None = None delisted_reason: str | None = None model_config = {"from_attributes": True}