feat: track download logs (ip, browser, device, time)

This commit is contained in:
mini
2026-02-18 23:20:50 +08:00
parent 0bab021e21
commit 27c9c87f5c
5 changed files with 149 additions and 15 deletions

View File

@@ -84,3 +84,23 @@ class LoginRequest(BaseModel):
class TokenResponse(BaseModel):
access_token: str
token_type: str = "bearer"
class DownloadLogInfo(BaseModel):
id: int
video_id: int
ip: str
user_agent: str
browser: str
device: str
downloaded_at: datetime
class Config:
from_attributes = True
class DownloadLogListResponse(BaseModel):
logs: list[DownloadLogInfo]
total: int
page: int
page_size: int