Complete implementation of the production line incident response system (生產線異常即時反應系統) including: Backend (FastAPI): - User authentication with AD integration and session management - Chat room management (create, list, update, members, roles) - Real-time messaging via WebSocket (typing indicators, reactions) - File storage with MinIO (upload, download, image preview) Frontend (React + Vite): - Authentication flow with token management - Room list with filtering, search, and pagination - Real-time chat interface with WebSocket - File upload with drag-and-drop and image preview - Member management and room settings - Breadcrumb navigation - 53 unit tests (Vitest) Specifications: - authentication: AD auth, sessions, JWT tokens - chat-room: rooms, members, templates - realtime-messaging: WebSocket, messages, reactions - file-storage: MinIO integration, file management - frontend-core: React SPA structure 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
29 lines
489 B
Python
29 lines
489 B
Python
"""Pydantic schemas for authentication API requests/responses"""
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class LoginRequest(BaseModel):
|
|
"""Login request body"""
|
|
|
|
username: str # Email address
|
|
password: str
|
|
|
|
|
|
class LoginResponse(BaseModel):
|
|
"""Login response"""
|
|
|
|
token: str # Internal session token
|
|
display_name: str
|
|
|
|
|
|
class LogoutResponse(BaseModel):
|
|
"""Logout response"""
|
|
|
|
message: str
|
|
|
|
|
|
class ErrorResponse(BaseModel):
|
|
"""Error response"""
|
|
|
|
error: str
|