Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/backend-main' into backend-main
Browse files Browse the repository at this point in the history
  • Loading branch information
java-saeng committed Aug 17, 2023
2 parents d7cea31 + 5750f98 commit ac1b640
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ public class RecruitmentPostQueryResponse {

private static final String DATE_TIME_FORMAT = "yyyy:MM:dd:HH:mm:ss";

private final Long id;
private final Long postId;
private final Long memberId;
private final Long eventId;
private final String eventName;
private final String content;
@DateTimeFormat(pattern = DATE_TIME_FORMAT)
private final LocalDate updatedAt;
Expand All @@ -26,6 +27,7 @@ public static RecruitmentPostQueryResponse from(final RecruitmentPost recruitmen
recruitmentPost.getId(),
member.getId(),
recruitmentPost.getEvent().getId(),
recruitmentPost.getEvent().getName(),
recruitmentPost.getContent(),
recruitmentPost.getUpdatedAt().toLocalDate()
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,14 +198,15 @@ void findRecruitmentPostsByMemberIdTest() throws Exception {
final LocalDate postedAt = LocalDate.of(2023, 7, 15);

final List<RecruitmentPostQueryResponse> response = List.of(
new RecruitmentPostQueryResponse(1L, memberId, 21L, "함께해요~", postedAt),
new RecruitmentPostQueryResponse(2L, memberId, 43L, "같이 가요~", postedAt)
new RecruitmentPostQueryResponse(1L, memberId, 21L, "인프콘 2023", "함께해요~", postedAt),
new RecruitmentPostQueryResponse(2L, memberId, 43L, "구름톤", "같이 가요~", postedAt)
);

final ResponseFieldsSnippet responseFields = responseFields(
fieldWithPath("[].id").type(JsonFieldType.NUMBER).description("함께해요 게시글 식별자"),
fieldWithPath("[].postId").type(JsonFieldType.NUMBER).description("함께해요 게시글 식별자"),
fieldWithPath("[].memberId").type(JsonFieldType.NUMBER).description("member의 식별자"),
fieldWithPath("[].eventId").type(JsonFieldType.NUMBER).description("행사의 식별자"),
fieldWithPath("[].eventName").type(JsonFieldType.STRING).description("행사 제목"),
fieldWithPath("[].content").type(JsonFieldType.STRING).description("함께해요 게시글 내용"),
fieldWithPath("[].updatedAt").type(JsonFieldType.STRING).description("함께해요 게시글 수정 날짜")
);
Expand Down

0 comments on commit ac1b640

Please sign in to comment.