Merge remote-tracking branch 'origin/main' into main-2
# Conflicts: # docs/SERVERS.md
This commit is contained in:
commit
840188e4ae
82 files changed
+4185
-78
No files matched your search
@@ -447,6 +447,48 @@ class alert_outbox(MainTableMixin, MAIN_BASE):
|
||||
resolved_at = Column(DateTime(timezone=True), nullable=True)
|
||||
|
||||
|
||||
class site_crawler_hits(MainTableMixin, MAIN_BASE):
|
||||
"""봇 요청 1건 = 1행 — nginx mirror 가 /internal/track/hit 로 넘긴 것. 기한 없이 보관한다(Umami 와 같다)."""
|
||||
|
||||
__tablename__ = "site_crawler_hits"
|
||||
__table_args__ = (
|
||||
Index("ix_site_crawler_hits_site", "site_id", "created_at"),
|
||||
Index("ix_site_crawler_hits_created", "created_at"),
|
||||
Index("ix_site_crawler_hits_bot", "bot", "created_at"),
|
||||
)
|
||||
|
||||
hit_id = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
|
||||
# robots·sitemap 은 오리진 공용이라, 없는 슬러그는 사이트를 못 찾아서 NULL 이다.
|
||||
site_id = Column(UUID(as_uuid=True), nullable=True)
|
||||
path = Column(Text, nullable=False)
|
||||
kind = Column(String(10), nullable=False) # page · robots · sitemap
|
||||
bot = Column(String(40), nullable=True) # 목록 밖(other)이면 NULL
|
||||
vendor = Column(String(40), nullable=True)
|
||||
purpose = Column(String(20), nullable=False) # training · search · user-fetch · search-engine · other
|
||||
user_agent = Column(Text, nullable=False)
|
||||
# 목록 봇만 남긴다 — other 에는 봇 UA 를 흉내 낸 사람이 섞일 수 있다.
|
||||
ip = Column(String(45), nullable=True)
|
||||
|
||||
|
||||
class site_page_views(MainTableMixin, MAIN_BASE):
|
||||
"""사람 페이지뷰 1건 = 1행 — 발행 사이트 비콘(/v1/track/view). 쿠키 없이, IP 원문 없이 쌓는다."""
|
||||
|
||||
__tablename__ = "site_page_views"
|
||||
__table_args__ = (
|
||||
Index("ix_site_page_views_site", "site_id", "created_at"),
|
||||
Index("ix_site_page_views_created", "created_at"),
|
||||
)
|
||||
|
||||
view_id = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
|
||||
site_id = Column(UUID(as_uuid=True), nullable=False)
|
||||
path = Column(Text, nullable=False)
|
||||
# sha256(비밀값|IP|UA|KST 월) — 달이 바뀌면 같은 사람도 새 방문자다(Umami 와 같다). IP 는 저장하지 않는다.
|
||||
visitor_hash = Column(String(64), nullable=False)
|
||||
referrer_domain = Column(String(255), nullable=True)
|
||||
utm_source = Column(String(100), nullable=True)
|
||||
device = Column(String(10), nullable=False) # desktop · mobile · tablet
|
||||
|
||||
|
||||
class site_sections(MainTableMixin, MAIN_BASE):
|
||||
"""섹션 하나의 콘텐츠."""
|
||||
|
||||
|
||||
Reference in new issue
Block a user