-
Notifications
You must be signed in to change notification settings - Fork 1
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
13 changed files
with
257 additions
and
50 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
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
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
12 changes: 12 additions & 0 deletions
12
src/main/java/com/dnd/accompany/domain/review/api/dto/AllEvaluationResponses.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,12 @@ | ||
package com.dnd.accompany.domain.review.api.dto; | ||
|
||
import lombok.Builder; | ||
|
||
import java.util.List; | ||
|
||
@Builder | ||
public record AllEvaluationResponses ( | ||
List<EvaluationResponse> evaluationResponse, | ||
int evaluationCount | ||
){ | ||
} |
31 changes: 31 additions & 0 deletions
31
src/main/java/com/dnd/accompany/domain/review/api/dto/EvaluationResponse.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,31 @@ | ||
package com.dnd.accompany.domain.review.api.dto; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
|
||
@AllArgsConstructor | ||
@Builder | ||
public class EvaluationResponse { | ||
@JsonProperty("type") | ||
private String type; | ||
|
||
@JsonProperty("count") | ||
private long count; | ||
|
||
public static EvaluationResponse create(TypeCountResult topResult) { | ||
if (topResult != null) { | ||
return EvaluationResponse.builder() | ||
.type(topResult.getType() != null ? topResult.getType() : null) | ||
.count(topResult.getCount()) | ||
.build(); | ||
} else { | ||
return EvaluationResponse.builder() | ||
.type(null) | ||
.count(0) | ||
.build(); | ||
} | ||
} | ||
} | ||
|
||
|
9 changes: 3 additions & 6 deletions
9
src/main/java/com/dnd/accompany/domain/review/api/dto/SimpleEvaluationResponse.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,15 +1,12 @@ | ||
package com.dnd.accompany.domain.review.api.dto; | ||
|
||
import com.dnd.accompany.domain.review.entity.enums.PersonalityType; | ||
import com.dnd.accompany.domain.review.entity.enums.TravelPreferenceType; | ||
import com.dnd.accompany.domain.review.entity.enums.TravelStyleType; | ||
import lombok.Builder; | ||
|
||
import java.util.List; | ||
|
||
@Builder | ||
public record SimpleEvaluationResponse( | ||
TravelStyleType travelStyle, | ||
TravelPreferenceType travelPreference, | ||
PersonalityType personalityType, | ||
List<EvaluationResponse> evaluationResponse, | ||
int evaluationCount | ||
) { | ||
} |
13 changes: 6 additions & 7 deletions
13
src/main/java/com/dnd/accompany/domain/review/api/dto/SimpleEvaluationResult.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,17 +1,16 @@ | ||
package com.dnd.accompany.domain.review.api.dto; | ||
|
||
import com.dnd.accompany.domain.review.entity.enums.PersonalityType; | ||
import com.dnd.accompany.domain.review.entity.enums.TravelPreferenceType; | ||
import com.dnd.accompany.domain.review.entity.enums.TravelStyleType; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.util.List; | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class SimpleEvaluationResult { | ||
private TravelStyleType travelStyle; | ||
private TravelPreferenceType travelPreference; | ||
private PersonalityType personalityType; | ||
} | ||
private List<TypeCountResult> travelStyles; | ||
private List<TypeCountResult> travelPreferences; | ||
private List<TypeCountResult> personalityTypes; | ||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/com/dnd/accompany/domain/review/api/dto/TypeCountResult.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,13 @@ | ||
package com.dnd.accompany.domain.review.api.dto; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class TypeCountResult { | ||
private String type; | ||
private long count; | ||
} |
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
Oops, something went wrong.