- 搭建 FastAPI、Redis、PostgreSQL、Nginx 与 Docker Compose 基础结构 - 实现反向代理、首用绑定、拦截告警、归档任务和管理接口 - 提供 Vue3 管理后台初版,以及 uv/requirements 双依赖配置
24 lines
438 B
Python
24 lines
438 B
Python
from __future__ import annotations
|
|
|
|
from datetime import datetime
|
|
|
|
from pydantic import BaseModel, ConfigDict
|
|
|
|
|
|
class InterceptLogItem(BaseModel):
|
|
model_config = ConfigDict(from_attributes=True)
|
|
|
|
id: int
|
|
token_display: str
|
|
bound_ip: str
|
|
attempt_ip: str
|
|
alerted: bool
|
|
intercepted_at: datetime
|
|
|
|
|
|
class LogListResponse(BaseModel):
|
|
items: list[InterceptLogItem]
|
|
total: int
|
|
page: int
|
|
page_size: int
|