搜索功能加入

This commit is contained in:
stardrophere
2026-03-13 18:25:38 +08:00
parent 9440b7f590
commit 6aee65af6c
18 changed files with 1545 additions and 103 deletions
+10
View File
@@ -24,6 +24,16 @@ class UnifiedEventResponse(BaseModel):
tags: List[str] = Field(default_factory=list)
class TimelineDataPoint(BaseModel):
time_label: str
count: int
event_ids: List[int] = Field(default_factory=list)
class SearchTimelineResponse(BaseModel):
keyword: str
timeline: List[TimelineDataPoint]
events: List[UnifiedEventResponse]
class PaginatedUnifiedEventResponse(BaseModel):
"""分页包装:避免一次性返回全量数据"""
total: int