-
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.
Merge pull request #117 from TeamPINGLE/feat/116
[feat] 그룹 키워드 반환 API
- Loading branch information
Showing
7 changed files
with
41 additions
and
19 deletions.
There are no files selected for viewing
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
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
15 changes: 15 additions & 0 deletions
15
src/main/java/org/pingle/pingleserver/dto/reponse/KeywordResponse.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,15 @@ | ||
package org.pingle.pingleserver.dto.reponse; | ||
|
||
import lombok.Builder; | ||
import org.pingle.pingleserver.domain.enums.TKeyword; | ||
|
||
@Builder | ||
public record KeywordResponse (String name, String value){ | ||
|
||
public static KeywordResponse of(TKeyword keyword){ | ||
return KeywordResponse.builder() | ||
.name(keyword.toString()) | ||
.value(keyword.getValue()) | ||
.build(); | ||
} | ||
} |
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
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
3 changes: 1 addition & 2 deletions
3
src/main/java/org/pingle/pingleserver/dto/response/TeamSearchResultResponse.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 |
---|---|---|
@@ -1,10 +1,9 @@ | ||
package org.pingle.pingleserver.dto.response; | ||
|
||
import org.pingle.pingleserver.domain.Team; | ||
import org.pingle.pingleserver.domain.enums.TKeyword; | ||
|
||
public record TeamSearchResultResponse(Long id, String name, String keyword) { | ||
public static TeamSearchResultResponse of(Team team) { | ||
return new TeamSearchResultResponse(team.getId(), team.getName(), team.getKeyword().toString()); | ||
return new TeamSearchResultResponse(team.getId(), team.getName(), team.getKeyword().getValue()); | ||
} | ||
} |
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