한국 멕시코 경기 댓글 기능 추가
This commit is contained in:
1 parent
7625db36a0
commit
8a67094510
10 files changed
+611
-2
No files matched your search
@@ -204,6 +204,29 @@ class PageVisit(Base):
|
||||
)
|
||||
|
||||
|
||||
class Comment(Base):
|
||||
"""경기별 한마디(댓글). 비로그인 — device_id 로 식별, 투표 시 입력한 email 을
|
||||
닉네임(마스킹 표시)으로 사용. 테이블은 범용이고 노출 경기는 프론트가 제한한다.
|
||||
|
||||
- 최신순 조회(created_at DESC) + limit/offset 페이징("더보기" 인라인 펼침).
|
||||
- is_hidden=True 는 관리자/신고 숨김 — 조회에서 제외.
|
||||
"""
|
||||
|
||||
__tablename__ = "comments"
|
||||
|
||||
id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
|
||||
match_id: Mapped[str] = mapped_column(
|
||||
ForeignKey("matches.match_id", ondelete="CASCADE"), index=True
|
||||
)
|
||||
device_id: Mapped[str] = mapped_column(String, index=True) # 비로그인 식별 + 쿨다운 기준
|
||||
email: Mapped[str] = mapped_column(String) # 소문자 정규화 — 마스킹해 표시
|
||||
body: Mapped[str] = mapped_column(String) # 길이 제한은 스키마(200자)에서
|
||||
is_hidden: Mapped[bool] = mapped_column(Boolean, default=False)
|
||||
created_at: Mapped[datetime] = mapped_column(
|
||||
DateTime(timezone=True), server_default=func.now(), index=True
|
||||
)
|
||||
|
||||
|
||||
class FootballCache(Base):
|
||||
"""축구 데이터 캐시 (API-Football 수집 결과) — 예측 프롬프트 조립용.
|
||||
|
||||
|
||||
Reference in new issue
Block a user