FastAPI backend with auth, user, instance, ticket, query, dashboard APIs. React + TypeScript frontend with mock data UI (10 pages). SQLite + async SQLAlchemy, JWT auth, role-based access control. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
17 lines
361 B
Python
17 lines
361 B
Python
from typing import Optional, List, Dict, Any
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class QueryRequest(BaseModel):
|
|
instance_id: int
|
|
database: Optional[str] = None
|
|
sql: str = Field(..., min_length=1)
|
|
|
|
|
|
class QueryResult(BaseModel):
|
|
columns: List[str]
|
|
rows: List[Dict[str, Any]]
|
|
total: int
|
|
elapsed_ms: int
|
|
truncated: bool = False
|