-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
LLearn/usecase/summary/get_user_summaries.py
Lines 19 to 45 in 66693cb
| summaries = await self.summary_repository.find_by_user_id(request.user_id) | |
| # 2. 각 요약에 대해 주차 및 커리큘럼 정보 조회 | |
| summary_data_list = [] | |
| for summary in summaries: | |
| # 주차 정보 조회 | |
| week_topic = await self.week_topic_repository.find_by_id(summary.week_topic_id) | |
| if not week_topic: | |
| continue # 주차 정보가 없으면 스킵 | |
| # 커리큘럼 정보 조회 | |
| curriculum = await self.curriculum_repository.find_by_id(week_topic.curriculum_id) | |
| if not curriculum: | |
| continue # 커리큘럼 정보가 없으면 스킵 | |
| # 내용 미리보기 생성 (앞 100자) | |
| content_preview = summary.content[:100] + "..." if len(summary.content) > 100 else summary.content | |
| summary_data = SummarySummaryData( | |
| id=summary.id, | |
| week_topic_title=week_topic.title, | |
| curriculum_title=curriculum.title, | |
| content_preview=content_preview, | |
| created_at=summary.created_at, | |
| updated_at=summary.updated_at | |
| ) | |
| summary_data_list.append(summary_data) |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels