77import lombok .NoArgsConstructor ;
88
99import java .util .List ;
10- import java .util .Map ;
1110
1211public class LibraryCompareResponseDTO {
1312
@@ -23,14 +22,14 @@ public static class CompareResult {
2322 @ JsonProperty ("group2" )
2423 private GroupInfo group2 ;
2524
26- @ JsonProperty ("keyCharacteristics " )
25+ @ JsonProperty ("key_characteristics " )
2726 private List <KeyCharacteristic > keyCharacteristics ;
2827
29- @ JsonProperty ("comparisonCharts " )
30- private List < ComparisonChart > comparisonCharts ;
28+ @ JsonProperty ("basic_comparison " )
29+ private Comparisons comparisons ;
3130
32- @ JsonProperty ("basicComparison " )
33- private List < BasicComparison > basicComparison ;
31+ @ JsonProperty ("insights " )
32+ private Insights insights ;
3433 }
3534
3635 @ Getter
@@ -39,19 +38,38 @@ public static class CompareResult {
3938 @ AllArgsConstructor
4039 public static class GroupInfo {
4140
42- @ JsonProperty ("libraryId " )
41+ @ JsonProperty ("library_id " )
4342 private Long libraryId ;
4443
45- @ JsonProperty ("libraryName " )
44+ @ JsonProperty ("library_name " )
4645 private String libraryName ;
4746
48- @ JsonProperty ("totalCount" )
47+ @ JsonProperty ("summary" )
48+ private String summary ;
49+
50+ @ JsonProperty ("total_count" )
4951 private Integer totalCount ;
5052
53+ @ JsonProperty ("filters" )
54+ private List <Filter > filters ;
55+
5156 @ JsonProperty ("color" )
5257 private String color ;
5358 }
5459
60+ @ Getter
61+ @ Builder
62+ @ NoArgsConstructor
63+ @ AllArgsConstructor
64+ public static class Filter {
65+
66+ @ JsonProperty ("key" )
67+ private String key ;
68+
69+ @ JsonProperty ("values" )
70+ private List <String > values ;
71+ }
72+
5573 @ Getter
5674 @ Builder
5775 @ NoArgsConstructor
@@ -64,10 +82,10 @@ public static class KeyCharacteristic {
6482 @ JsonProperty ("description" )
6583 private String description ;
6684
67- @ JsonProperty ("group1Percentage " )
85+ @ JsonProperty ("group1_percentage " )
6886 private Integer group1Percentage ;
6987
70- @ JsonProperty ("group2Percentage " )
88+ @ JsonProperty ("group2_percentage " )
7189 private Integer group2Percentage ;
7290
7391 @ JsonProperty ("difference" )
@@ -78,34 +96,71 @@ public static class KeyCharacteristic {
7896 @ Builder
7997 @ NoArgsConstructor
8098 @ AllArgsConstructor
81- public static class ComparisonChart {
99+ public static class Comparisons {
82100
83- @ JsonProperty ("chartType " )
84- private String chartType ;
101+ @ JsonProperty ("group1 " )
102+ private GroupMetrics group1 ;
85103
86- @ JsonProperty ("title" )
87- private String title ;
104+ @ JsonProperty ("group2" )
105+ private GroupMetrics group2 ;
106+ }
88107
89- @ JsonProperty ("data" )
90- private Map <String , Object > data ;
108+ @ Getter
109+ @ Builder
110+ @ NoArgsConstructor
111+ @ AllArgsConstructor
112+ public static class GroupMetrics {
113+
114+ @ JsonProperty ("male" )
115+ private Integer male ;
116+
117+ @ JsonProperty ("female" )
118+ private Integer female ;
119+
120+ @ JsonProperty ("seoul" )
121+ private Integer seoul ;
122+
123+ @ JsonProperty ("gyeonggi" )
124+ private Integer gyeonggi ;
125+
126+ @ JsonProperty ("busan" )
127+ private Integer busan ;
91128
92- @ JsonProperty ("options" )
93- private Map <String , Object > options ;
129+ @ JsonProperty ("region_etc" )
130+ private Integer regionEtc ;
131+
132+ @ JsonProperty ("avg_age" )
133+ private Double avgAge ;
134+
135+ @ JsonProperty ("avg_family" )
136+ private Double avgFamily ;
137+
138+ @ JsonProperty ("avg_children" )
139+ private Double avgChildren ;
140+
141+ @ JsonProperty ("rate_possessing_car" )
142+ private Integer ratePossessingCar ;
143+
144+ @ JsonProperty ("avg_personal_income" )
145+ private Integer avgPersonalIncome ;
146+
147+ @ JsonProperty ("avg_family_income" )
148+ private Integer avgFamilyIncome ;
94149 }
95150
96151 @ Getter
97152 @ Builder
98153 @ NoArgsConstructor
99154 @ AllArgsConstructor
100- public static class BasicComparison {
155+ public static class Insights {
101156
102- @ JsonProperty ("metric " )
103- private String metric ;
157+ @ JsonProperty ("difference " )
158+ private String difference ;
104159
105- @ JsonProperty ("group1Value " )
106- private String group1Value ;
160+ @ JsonProperty ("common " )
161+ private String common ;
107162
108- @ JsonProperty ("group2Value " )
109- private String group2Value ;
163+ @ JsonProperty ("implication " )
164+ private String implication ;
110165 }
111166}
0 commit comments