Skip to content

Commit

Permalink
[BE] fix: ReservationResponse Status 추가 (#153)
Browse files Browse the repository at this point in the history
* refactor: 프로젝트 코드 포맷팅

* refactor: ReservationResponse status 필드 추가
  • Loading branch information
HyeonbinSa authored Aug 3, 2022
1 parent 4414aa8 commit 3ff2bd7
Show file tree
Hide file tree
Showing 4 changed files with 108 additions and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.fasterxml.jackson.annotation.JsonFormat;
import com.woowacourse.ternoko.domain.Interview;
import com.woowacourse.ternoko.domain.InterviewStatusType;
import com.woowacourse.ternoko.domain.Reservation;
import java.time.LocalDateTime;
import java.util.List;
Expand All @@ -21,6 +22,7 @@ public class ReservationResponse {
private String coachNickname;
private String imageUrl;
private String crewNickname;
private InterviewStatusType status;

@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm", timezone = "Asia/Seoul")
private LocalDateTime interviewStartTime;
Expand All @@ -44,6 +46,7 @@ public static ReservationResponse from(final Reservation reservation) {
.interviewStartTime(interview.getInterviewStartTime())
.interviewEndTime(interview.getInterviewEndTime())
.interviewQuestions(formItemResponses)
.status(interview.getInterviewStatusType())
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ void findAvailableDateTimesByCoachId() {
coachService.putAvailableDateTimesByCoachId(COACH3.getId(), MONTHS_REQUEST);
// when
final List<AvailableDateTime> availableDateTimes = coachService
.findAvailableDateTimesByCoachId(COACH3.getId(), NOW_PLUS_1_MONTH.getYear(), NOW_PLUS_1_MONTH.getMonthValue());
.findAvailableDateTimesByCoachId(COACH3.getId(), NOW_PLUS_1_MONTH.getYear(),
NOW_PLUS_1_MONTH.getMonthValue());

// then
assertThat(availableDateTimes.stream()
Expand Down
Empty file.
Loading

0 comments on commit 3ff2bd7

Please sign in to comment.