Files
DonaldFang 方士碩 f810ddc2ea Initial commit: KPI Management System Backend
Features:
- FastAPI backend with JWT authentication
- MySQL database with SQLAlchemy ORM
- KPI workflow: draft → pending → approved → evaluation → completed
- Ollama LLM API integration for AI features
- Gitea API integration for version control
- Complete API endpoints for KPI, dashboard, notifications

Tables: KPI_D_* prefix naming convention

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 16:20:57 +08:00

45 lines
715 B
Python

"""
認證 Schemas
"""
from typing import Optional
from pydantic import BaseModel, EmailStr
class LoginRequest(BaseModel):
"""登入請求"""
employee_no: str
password: str
class TokenResponse(BaseModel):
"""Token 回應"""
access_token: str
refresh_token: str
token_type: str = "bearer"
class RefreshTokenRequest(BaseModel):
"""更新 Token 請求"""
refresh_token: str
class UserInfo(BaseModel):
"""使用者資訊"""
id: int
employee_no: str
name: str
email: str
department_id: int
department_name: str
job_title: Optional[str]
role: str
is_manager: bool
is_admin: bool
class Config:
from_attributes = True