Skip to content

Commit

Permalink
feat: 🎸 Response DTO 내용 수정
Browse files Browse the repository at this point in the history
Closes: #226
  • Loading branch information
sallyjellyy committed Nov 30, 2021
1 parent 282fbca commit e3f313b
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 26 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
package com.postsquad.scoup.web.group.controller.response;

import com.postsquad.scoup.web.image.controller.ImageResponse;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@NoArgsConstructor
@AllArgsConstructor
@Data
public class GroupBaseResponse {

private Long id;

// TODO: 필요한지 확인 필요
private ImageResponse image;

// TODO: 필요한지 확인 필요
private long memberCount;

private String name;

private String description;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.postsquad.scoup.web.group.controller.response;

import com.postsquad.scoup.web.group.domain.Group;
import lombok.*;

@EqualsAndHashCode(callSuper = false)
@AllArgsConstructor
@Data
public class GroupReadAllResponse extends GroupBaseResponse {

@Builder
protected GroupReadAllResponse(Long id, String name, String description) {
super(id, name, description);
}

public static GroupReadAllResponse from(Group group) {
return new GroupReadAllResponse(group.getId(), group.getName(), group.getDescription());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.postsquad.scoup.web.group.controller.response;

import lombok.*;

import java.util.List;

@NoArgsConstructor
@AllArgsConstructor(staticName = "from")
@Builder
@Data
public class GroupReadAllResponses {

private List<GroupReadAllResponse> groupReadAllResponse;
}

This file was deleted.

This file was deleted.

0 comments on commit e3f313b

Please sign in to comment.