-
Notifications
You must be signed in to change notification settings - Fork 0
[CMAT-50] feat : 플래너 생성 다시 추가 및 초기 데이터 타입 수정 #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -28,8 +28,27 @@ public static Planner toPlanner(Member member, CreatePlannerDTO createPlannerDTO | |||||||||||||||||||||||||||||||||||||||||||||||
| .build(); | ||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| public static List<Planner> toPlannerList(Member member, List<CreatePlannerDTO> createPlannerDTOList){ | ||||||||||||||||||||||||||||||||||||||||||||||||
| return createPlannerDTOList.stream().map(createPlannerDTO -> PlannerConverter.toPlanner(member, createPlannerDTO)).toList(); | ||||||||||||||||||||||||||||||||||||||||||||||||
| public static Planner toInitialPlanner(Member member){ | ||||||||||||||||||||||||||||||||||||||||||||||||
| return Planner | ||||||||||||||||||||||||||||||||||||||||||||||||
| .builder() | ||||||||||||||||||||||||||||||||||||||||||||||||
| .activityName("") | ||||||||||||||||||||||||||||||||||||||||||||||||
| .startTime(null) | ||||||||||||||||||||||||||||||||||||||||||||||||
| .endTime(null) | ||||||||||||||||||||||||||||||||||||||||||||||||
| .specifics("") | ||||||||||||||||||||||||||||||||||||||||||||||||
| .measurable("") | ||||||||||||||||||||||||||||||||||||||||||||||||
| .achievable("") | ||||||||||||||||||||||||||||||||||||||||||||||||
| .relevant("") | ||||||||||||||||||||||||||||||||||||||||||||||||
| .timeBound("") | ||||||||||||||||||||||||||||||||||||||||||||||||
| .otherPlans("") | ||||||||||||||||||||||||||||||||||||||||||||||||
| .member(member) | ||||||||||||||||||||||||||||||||||||||||||||||||
| .build(); | ||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| public static List<Planner> toInitialPlannerList(Member member){ | ||||||||||||||||||||||||||||||||||||||||||||||||
| return List.of( | ||||||||||||||||||||||||||||||||||||||||||||||||
| PlannerConverter.toInitialPlanner(member), | ||||||||||||||||||||||||||||||||||||||||||||||||
| PlannerConverter.toInitialPlanner(member) | ||||||||||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+45
to
50
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion 초기 플래너 리스트 생성 로직 개선이 필요합니다. 현재 구현의 잠재적인 문제점들:
다음과 같이 개선하는 것을 제안드립니다: public static List<Planner> toInitialPlannerList(Member member){
- return List.of(
- PlannerConverter.toInitialPlanner(member),
- PlannerConverter.toInitialPlanner(member)
- );
+ List<Planner> planners = new ArrayList<>();
+
+ Planner firstPlanner = PlannerConverter.toInitialPlanner(member);
+ firstPlanner.setActivityName("첫 번째 활동");
+ planners.add(firstPlanner);
+
+ Planner secondPlanner = PlannerConverter.toInitialPlanner(member);
+ secondPlanner.setActivityName("두 번째 활동");
+ planners.add(secondPlanner);
+
+ return planners;
}또한, 초기 플래너의 개수를 설정 파일이나 상수로 관리하는 것을 고려해보세요. 📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| public static PlannerResponseDTO toPlannerResponseDTO(Planner planner){ | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
초기 플래너 생성 메소드의 개선이 필요합니다.
다음과 같은 개선사항을 제안드립니다:
📝 Committable suggestion