feat(stats): 일별 방문자 집계 추가
page_visits 테이블((visit_date, device_id) 유니크) — 하루 1기기 1회 집계. POST /api/visit(접속 기록), GET /api/admin/visits(일별 순수 방문자, Bearer). 프론트는 App 마운트 시 1회 recordVisit() 호출. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
51352c7c5c
commit
140e15fb9f
7 files changed
+97
-5
No files matched your search
@@ -125,3 +125,18 @@ class GenericOk(BaseModel):
|
||||
ok: bool
|
||||
detail: str = ""
|
||||
extra: dict | None = None
|
||||
|
||||
|
||||
# ── 방문자 집계 ─────────────────────────────────────────────
|
||||
class VisitIn(BaseModel):
|
||||
deviceId: str = Field(min_length=8, max_length=64)
|
||||
|
||||
|
||||
class VisitOut(BaseModel):
|
||||
ok: bool
|
||||
counted: bool # 오늘 첫 방문이면 True(집계됨), 재방문이면 False
|
||||
|
||||
|
||||
class DailyVisitOut(BaseModel):
|
||||
date: str # YYYY-MM-DD (KST)
|
||||
uniqueVisitors: int
|
||||
Reference in new issue
Block a user