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>
This commit is contained in:
47
app/schemas/notification.py
Normal file
47
app/schemas/notification.py
Normal file
@@ -0,0 +1,47 @@
|
||||
"""
|
||||
通知 Schemas
|
||||
"""
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class NotificationResponse(BaseModel):
|
||||
"""通知回應"""
|
||||
|
||||
id: int
|
||||
type: str
|
||||
title: str
|
||||
content: Optional[str]
|
||||
related_sheet_id: Optional[int]
|
||||
is_read: bool
|
||||
read_at: Optional[datetime]
|
||||
created_at: datetime
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
|
||||
|
||||
class NotificationPreferenceResponse(BaseModel):
|
||||
"""通知偏好回應"""
|
||||
|
||||
email_enabled: bool
|
||||
in_app_enabled: bool
|
||||
reminder_days_before: int
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
|
||||
|
||||
class NotificationPreferenceUpdate(BaseModel):
|
||||
"""更新通知偏好"""
|
||||
|
||||
email_enabled: Optional[bool] = None
|
||||
in_app_enabled: Optional[bool] = None
|
||||
reminder_days_before: Optional[int] = None
|
||||
|
||||
|
||||
class UnreadCountResponse(BaseModel):
|
||||
"""未讀數量回應"""
|
||||
|
||||
count: int
|
||||
Reference in New Issue
Block a user