galaxis-po/backend/app/schemas/notification.py
머니페니 12d235a1f1 feat: add 9 new modules - notification alerts, trading journal, position sizing, pension allocation, drawdown monitoring, benchmark dashboard, tax simulation, correlation analysis, parameter optimizer
Phase 1:
- Real-time signal alerts (Discord/Telegram webhook)
- Trading journal with entry/exit tracking
- Position sizing calculator (Fixed/Kelly/ATR)

Phase 2:
- Pension asset allocation (DC/IRP 70% risk limit)
- Drawdown monitoring with SVG gauge
- Benchmark dashboard (portfolio vs KOSPI vs deposit)

Phase 3:
- Tax benefit simulation (Korean pension tax rules)
- Correlation matrix heatmap
- Parameter optimizer with grid search + overfit detection
2026-03-29 10:03:08 +09:00

51 lines
1.1 KiB
Python

"""
Notification related Pydantic schemas.
"""
from datetime import datetime
from typing import Optional, List
from enum import Enum
from pydantic import BaseModel, Field
class ChannelType(str, Enum):
DISCORD = "discord"
TELEGRAM = "telegram"
class NotificationSettingCreate(BaseModel):
channel_type: ChannelType
webhook_url: str = Field(..., min_length=1, max_length=500)
enabled: bool = True
class NotificationSettingUpdate(BaseModel):
webhook_url: Optional[str] = Field(None, min_length=1, max_length=500)
enabled: Optional[bool] = None
class NotificationSettingResponse(BaseModel):
id: int
user_id: int
channel_type: str
webhook_url: str
enabled: bool
created_at: datetime
updated_at: datetime
class Config:
from_attributes = True
class NotificationHistoryResponse(BaseModel):
id: int
signal_id: int
channel_type: str
sent_at: datetime
status: str
message: Optional[str] = None
error_message: Optional[str] = None
class Config:
from_attributes = True