[DP-395/396] trend_snapshots·content_view_logs DDL + 조회 이력 기록#128
Merged
[DP-395/396] trend_snapshots·content_view_logs DDL + 조회 이력 기록#128
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
trend_snapshots테이블 DDL — AI 서버 트렌드 분석 결과 저장용, BE는 JPA Entity로 스키마만 생성content_view_logs테이블 DDL +ContentService.getDetail()진입 시 조회 이력 기록 (fire-and-forget, 봇 UA 필터링)user_id BIGINT→UUID수정 (User PK = UUID)변경 파일
domain/trend/entity/TrendSnapshot.java(신규) — UNIQUE(unit, scope, period_start), 인덱스 포함domain/content/entity/ContentViewLog.java(신규) — 인덱스 2개 포함domain/content/repository/ContentViewLogRepository.java(신규)domain/content/service/ContentViewLogService.java(신규) — 봇 UA 필터링,REQUIRES_NEWTXContentService.getDetail()—userAgent파라미터 추가, 뷰 로그 기록 (try-catch)ContentController.getDetail()—HttpServletRequest로 User-Agent 추출Test plan
TrendSnapshotTest— 필드 검증 3케이스ContentViewLogServiceTest— 봇 필터링 + 정상/null UA 9케이스ContentServiceTest— 뷰 로그 호출 검증, fire-and-forget 실패 케이스 추가ContentControllerTest— 3파라미터 시그니처 반영./gradlew build --no-daemon전체 통과