feat(shorts): add shorts feed v1 (cursor paging + saved state)#46
Open
rivkode wants to merge 1 commit into
Open
feat(shorts): add shorts feed v1 (cursor paging + saved state)#46rivkode wants to merge 1 commit into
rivkode wants to merge 1 commit into
Conversation
- New domain: Shorts entity (youtube_video_id, source_url, is_active) and UserSavedShort join entity tied to User - ShortsFeedQueryRepository (cursor-based) + Spring Data repositories - ShortsService.retrieveFeed returns slim feed items (shortId, youtubeVideoId, sourceUrl, userState.saved) with cursor paging - GET /api/v1/shorts/feed (cursor + size 1..50) wired through ShortsApiController - Reference DDL `system/db/migration/202604200001_create_shorts_and_seed_feed.sql` with `shorts`, `user_saved_short` schemas plus seed inserts (note: also contains seeds into clip_source_video / clip_learning_clip — keep an eye on whether those belong here) No external secrets introduced. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
신규
shorts도메인을 추가합니다.Shorts엔티티 (youtube_video_idlength=11,source_url,is_active)UserSavedShort엔티티 (User ↔ Shorts join, unique(user_id, short_id))ShortsFeedQueryRepository(cursor 기반)ShortsRepository,UserSavedShortRepository(Spring Data JPA)ShortsService.retrieveFeed: 슬림 응답 (shortId,youtubeVideoId,sourceUrl,userState.saved) + 커서 페이지네이션GET /api/v1/shorts/feed(cursor, size 1..50) →ShortsApiControllersystem/db/migration/202604200001_create_shorts_and_seed_feed.sqlshorts,user_saved_short테이블 + seed insertclip_source_video/clip_learning_clipseed insert도 함께 들어있습니다. shorts와 결합도가 없는 부분이라 별도 PR로 분리할지 검토 필요.Notes
src/main/resources/db/migration/V?__create_shorts.sql로 별도 PR에서 추가 권장Test plan
./gradlew compileKotlin compileTestKotlin통과GET /api/v1/shorts/feed?size=10200 응답 확인 (saved=false 기본)userState.saved=true확인nextCursor/hasNext정상 동작🤖 Generated with Claude Code