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>
25 lines
415 B
Python
25 lines
415 B
Python
from typing import Optional
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class LoginRequest(BaseModel):
|
|
username: str
|
|
password: str
|
|
|
|
|
|
class TokenResponse(BaseModel):
|
|
access_token: str
|
|
token_type: str = "bearer"
|
|
user: "UserBrief"
|
|
|
|
|
|
class UserBrief(BaseModel):
|
|
id: int
|
|
username: str
|
|
display_name: str
|
|
role: str
|
|
email: Optional[str] = None
|
|
|
|
class Config:
|
|
from_attributes = True
|