18 lines
353 B
Python
18 lines
353 B
Python
"""Ticker request/response schemas."""
|
|
|
|
from datetime import 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
|
|
created_at: datetime
|
|
|
|
model_config = {"from_attributes": True}
|