-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from sswu-meets/feat/change-schedule-list-api
feat: 유저가 참여하고 있는 일정 리스트 조회 API의 반환 형식 수정
- Loading branch information
Showing
6 changed files
with
105 additions
and
31 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
48 changes: 48 additions & 0 deletions
48
src/main/java/com/sswu/meets/dto/schedule/response/ScheduleResponseDto.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package com.sswu.meets.dto.schedule.response; | ||
|
||
import com.sswu.meets.domain.schedule.Schedule; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
import java.time.LocalDate; | ||
import java.time.LocalTime; | ||
import java.util.List; | ||
import java.util.stream.Collectors; | ||
|
||
@Getter | ||
public class ScheduleResponseDto { | ||
private Long no; | ||
private Long meetingNo; | ||
private String scheduleName; | ||
private LocalDate fixStartDate; // 고정 일정인 경우 시작 날짜 | ||
private LocalDate fixEndDate; // 고정 일정인 경우 종료 날짜 | ||
private List<LocalDate> tuneDateList; // 종료 일정인 경우 날짜 리스트 | ||
private LocalTime startTime; | ||
private LocalTime endTime; | ||
private Boolean dateTuneState; | ||
private Boolean placeTuneState; | ||
private List<String> participants; | ||
|
||
@Builder | ||
public ScheduleResponseDto( | ||
Schedule schedule, | ||
LocalDate fixStartDate, | ||
LocalDate fixEndDate, | ||
List<LocalDate> tuneDateList | ||
) { | ||
this.no = schedule.getScheduleNo(); | ||
this.meetingNo = schedule.getMeeting() != null ? schedule.getMeeting().getMeeting_no() : null; | ||
this.scheduleName = schedule.getScheduleName(); | ||
this.fixStartDate = fixStartDate; | ||
this.fixEndDate = fixEndDate; | ||
this.tuneDateList = tuneDateList; | ||
this.startTime = schedule.getStartTime(); | ||
this.endTime = schedule.getEndTime(); | ||
this.dateTuneState = schedule.getDateTuneState(); | ||
this.placeTuneState = schedule.getPlaceTuneState(); | ||
this.participants = schedule.getAttendanceList().stream() | ||
.map(a -> a.getUser().getName()) | ||
.collect(Collectors.toList()); | ||
} | ||
|
||
} |
This file contains 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
This file contains 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