-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
59 additions
and
3 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
src/main/java/com/m3pro/groundflip/controller/CommunityController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/main/java/com/m3pro/groundflip/domain/dto/community/ListResponseCommunity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.m3pro.groundflip.domain.dto.community; | ||
|
||
import com.m3pro.groundflip.domain.entity.Community; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Data | ||
@Builder | ||
public class ListResponseCommunity { | ||
private String name; | ||
|
||
public static ListResponseCommunity from(Community community) { | ||
return ListResponseCommunity.builder() | ||
.name(community.getName()) | ||
.build(); | ||
} | ||
|
||
} |
33 changes: 33 additions & 0 deletions
33
src/main/java/com/m3pro/groundflip/domain/dto/community/ResponseGetGroup.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.m3pro.groundflip.domain.dto.community; | ||
|
||
import com.m3pro.groundflip.domain.entity.Community; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Data | ||
@Builder | ||
public class ResponseGetGroup { | ||
private String name; | ||
private String pixelColor; | ||
private String profileImageUrl; | ||
private String backgroundImageUrl; | ||
private int groupRanking; | ||
private int memberCount; | ||
|
||
public static ResponseGetGroup from(Community community, int groupRanking, int memberCount){ | ||
return ResponseGetGroup.builder() | ||
.name(community.getName()) | ||
.pixelColor(community.getPixelColor()) | ||
.profileImageUrl(community.getProfileImageUrl()) | ||
.backgroundImageUrl(community.getBackgroundImageUrl()) | ||
.groupRanking(groupRanking) | ||
.memberCount(memberCount) | ||
.build(); | ||
} | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
src/main/java/com/m3pro/groundflip/repository/CommunityRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/com/m3pro/groundflip/service/CommunityService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters