sequenceDiagram
autonumber
participant Client as 클라이언트(브라우저)
participant API as 백엔드 API 서버
participant DB as 데이터베이스
rect rgba(200, 255, 200, 0.1)
Note over Client, DB: 콘텐츠 상세 정보 조회 프로세스
Client->>Client: 콘텐츠 썸네일 클릭
Client->>API: 콘텐츠 상세 정보 요청<br>(content_id, JWT 토큰(선택적))
alt 로그인 상태인 경우
API->>API: JWT 토큰 검증
end
API->>DB: 콘텐츠 상세 정보 조회<br>(Contents 테이블 JOIN ContentGenres JOIN Genres)
DB-->>API: 콘텐츠 상세 정보 반환<br>(id, title, description, thumbnail_url, video_url, duration, release_year, 장르 목록)
alt 로그인 상태인 경우
API->>DB: 찜 상태 확인<br>(Wishlists 테이블)
DB-->>API: 찜 여부 반환
API->>DB: 시청 기록 조회<br>(ViewingHistories 테이블)
DB-->>API: 최근 시청 정보 반환<br>(last_position)
end
API-->>Client: 200 OK<br>(콘텐츠 상세 정보, 찜 상태, 시청 위치(선택적))
Client->>Client: 콘텐츠 상세 페이지 렌더링<br>(찜하기 버튼, 재생 버튼 등)
end
Created
April 18, 2025 15:41
-
-
Save Mineru98/efadd18d797f7ebff7c2befb8a3f399a to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment