Skip to content

Commit

Permalink
refactor: 요구사항 변경에 따른 응답 DTO 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
yechan-kim committed Sep 25, 2024
1 parent 58d1fec commit 84da83b
Showing 1 changed file with 33 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,38 @@
import site.dpbr.dsjs.domain.character.domain.Character;

public record SearchCharacterInfoResponse(
String name,
String gender,
String world,
String job,
Integer level,
Integer unionLevel,
Integer unionArtifactLevel,
Long combatPower,
Integer muLungFloor,
String characterImage,
Double percentage
String name,
String gender,
String world,
String job,
Integer level,
Integer unionLevel,
Long combatPower,
String characterImage,
Integer charactersCount,
Integer sameWorldCount,
Integer sameJobCount,
Double levelRanking,
Double unionRanking,
Double combatPowerRanking

) {
public static SearchCharacterInfoResponse of(Character character, Double percentage) {
return new SearchCharacterInfoResponse(
character.getName(),
character.getGender(),
character.getWorld(),
character.getJob(),
character.getLevel(),
character.getUnionLevel(),
character.getUnionArtifactLevel(),
character.getCombatPower(),
character.getMuLungFloor(),
character.getCharacterImage(),
percentage);
}
public static SearchCharacterInfoResponse of(Character character, Integer charactersCount, Integer sameWorldCount,
Integer sameJobCount, Double levelRanking, Double unionRanking, Double combatPowerRanking) {
return new SearchCharacterInfoResponse(
character.getName(),
character.getGender(),
character.getWorld(),
character.getJob(),
character.getLevel(),
character.getUnionLevel(),
character.getCombatPower(),
character.getCharacterImage(),
charactersCount,
sameWorldCount,
sameJobCount,
levelRanking,
unionRanking,
combatPowerRanking);
}
}

0 comments on commit 84da83b

Please sign in to comment.