-
Notifications
You must be signed in to change notification settings - Fork 0
Feat: 일정 조회 및 참여 API #29
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
Conversation
Test Coverage Report
|
choiseoji
left a comment
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.
수고하셨습니다!
| @Mapping(target = "startDateTime", expression = "java(java.time.LocalDateTime.of(event.getDate(), event.getStartTime()))") | ||
| @Mapping(target = "endDateTime", expression = "java(java.time.LocalDateTime.of(event.getDate(), event.getEndTime()))") | ||
| @Mapping(target = "startLocation", source = "event.place") | ||
| @Mapping(target = "runningLeaderId", source = "event.member.id") | ||
| @Mapping(target = "distanceKm", source = "event.distanceKm") | ||
| @Mapping(target = "runningTime", source = "event.runningTime") | ||
| EventDetailResponse toEventDetailResponse(Event event, EventStatus status, List<ParticipantDto> participants); | ||
|
|
||
| @Mapping(target = "id", source = "member.id") | ||
| @Mapping(target = "name", source = "member.nickname") | ||
| @Mapping(target = "image", source = "member.profileImage") | ||
| ParticipantDto toParticipantDto(JoinEvent joinEvent); | ||
|
|
||
| default List<ParticipantDto> toParticipantDtoList(List<JoinEvent> joinEvents) { | ||
| return joinEvents.stream() | ||
| .map(this::toParticipantDto) | ||
| .toList(); | ||
| } |
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.
근데 이거 어떤거 Mapping으로 하고, 어떤건 default로 한 기준이 궁금합니다!
저는 모든 필드에 Mapping 다 할거면 그냥 default로 빌더 써서 했고, responseDto 만드는 거에 대해서만 map-struct 사용했는데 동현님은 어떤 기준으로 한건지 궁금합니다..
| JoinEvent joinEvent = joinEventRepository.findByEventAndMember(event, member) | ||
| .orElseThrow(JoinEventNotFound::new); | ||
|
|
||
| joinEvent.softDelete(); |
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.
이거 sortDelete() 직접 구현해도 좋고
JoinEvent Entity 상단에
@SQLDelete(sql = "UPDATE JoinEvent SET deleted_at = NOW() where join_event_id = ?")
이런 식으로 해서 자동으로 적용 되도록 해도 좋아요!!
✨ 연관된 이슈
📝 작업 내용 (주요 변경 사항)
💬 리뷰 요구사항