Skip to content

Commit

Permalink
fix:add memberloginIds in activity response
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmy0006 committed Apr 9, 2024
1 parent 878a2f5 commit 714667a
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ public class GetActivitiesResponse {
private final Long capacity;
private final boolean isSeminar;
private final Long hour;
private final Long joinedMemberCount;
private final List<String> memberLoginIds;

public GetActivitiesResponse(Long id, String title, HostResponse host, LocalDate startDate, boolean available, List<TagResponse> tags, Long capacity, boolean isSeminar, Long hour, Long joinedMemberCount) {
public GetActivitiesResponse(Long id, String title, HostResponse host, LocalDate startDate, boolean available, List<TagResponse> tags, Long capacity, boolean isSeminar, Long hour,List<String> memberLoginIds) {
this.id = id;
this.title = title;
this.host = host;
Expand All @@ -30,8 +30,8 @@ public GetActivitiesResponse(Long id, String title, HostResponse host, LocalDate
this.capacity = capacity;
this.isSeminar = isSeminar;
this.hour = hour;
this.joinedMemberCount= joinedMemberCount;
}
this.memberLoginIds = memberLoginIds;
}

public static GetActivitiesResponse of(Activity activity) {
List<TagResponse> tags = activity.getTags().stream()
Expand All @@ -40,7 +40,7 @@ public static GetActivitiesResponse of(Activity activity) {
HostResponse host = HostResponse.of(activity.getHost());
return new GetActivitiesResponse(activity.getId(), activity.getTitle(), host,
activity.getStartDate(), activity.getAvailable(),
tags, activity.getCapacity(), activity.getIsSeminar(), activity.getHour(), Long.valueOf(activity.getMemberLoginIDs().size())
tags, activity.getCapacity(), activity.getIsSeminar(), activity.getHour(), activity.getMemberLoginIDs()
);
}
}

0 comments on commit 714667a

Please sign in to comment.