Skip to content

Commit

Permalink
fix : 그룹 초대 아이디 추가
Browse files Browse the repository at this point in the history
- 커서 기반 슬라이싱을 위한 groupInviteId 추가
  • Loading branch information
seokho-1116 committed Jun 5, 2024
1 parent 0683926 commit 22c18ea
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@
import site.timecapsulearchive.core.domain.member_group.data.response.GroupSendingInviteMemberResponse;

public record GroupSendingInviteMemberDto(
Long id,
Long groupInviteId,
Long memberId,
String nickname,
String profileUrl,
ZonedDateTime sendingInvitesCreatedAt
) {

public GroupSendingInviteMemberResponse toResponse() {
return GroupSendingInviteMemberResponse.builder()
.id(id)
.groupInviteId(groupInviteId)
.memberId(memberId)
.nickname(nickname)
.profileUrl(profileUrl)
.sendingInvitesCreatedAt(sendingInvitesCreatedAt)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

@Builder
public record GroupSendingInviteMemberResponse(
Long id,
Long groupInviteId,
Long memberId,
String nickname,
String profileUrl,
ZonedDateTime sendingInvitesCreatedAt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ public Slice<GroupSendingInviteMemberDto> findGroupSendingInvites(
.select(
Projections.constructor(
GroupSendingInviteMemberDto.class,
groupInvite.id,
member.id,
member.nickname,
member.profileUrl,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ void setUp(@Autowired EntityManager entityManager) {
//then
SoftAssertions.assertSoftly(softly -> {
softly.assertThat(groupSendingInvites.hasContent()).isTrue();
softly.assertThat(groupSendingInvites.getContent()).allMatch(dto -> dto.id() != null);
softly.assertThat(groupSendingInvites.getContent()).allMatch(dto -> dto.groupInviteId() != null);
softly.assertThat(groupSendingInvites.getContent()).allMatch(dto -> dto.memberId() != null);
softly.assertThat(groupSendingInvites.getContent())
.allMatch(dto -> dto.nickname() != null && !dto.nickname().isBlank());
softly.assertThat(groupSendingInvites.getContent())
Expand Down

0 comments on commit 22c18ea

Please sign in to comment.