Skip to content

Commit

Permalink
rename: DashboareType에 AnalysisType 추가(#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
eun-seong committed Mar 6, 2024
1 parent 3d8e528 commit 35418a0
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.dnd.namuiwiki.domain.dashboard.type;

public enum AnalysisType {
USER, POPULATION;

public boolean isUser() {
return this == USER;
}

public boolean isPopulation() {
return this == POPULATION;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,25 @@

public enum DashboardType {

BEST_WORTH(StatisticsCalculationType.RATIO, DashboardStatisticType.RATIO),
CHARACTER(StatisticsCalculationType.RATIO, DashboardStatisticType.BINARY),
MONEY(StatisticsCalculationType.AVERAGE, DashboardStatisticType.AVERAGE),
HAPPY(StatisticsCalculationType.RATIO, DashboardStatisticType.RATIO),
SAD(StatisticsCalculationType.RATIO, DashboardStatisticType.RATIO);

private DashboardType(StatisticsCalculationType statisticsCalculationType, DashboardStatisticType dashboardStatisticType) {
BEST_WORTH(StatisticsCalculationType.RATIO, DashboardStatisticType.RATIO, AnalysisType.USER),
CHARACTER(StatisticsCalculationType.RATIO, DashboardStatisticType.BINARY, AnalysisType.USER),
MONEY(StatisticsCalculationType.AVERAGE, DashboardStatisticType.AVERAGE, AnalysisType.POPULATION),
HAPPY(StatisticsCalculationType.RATIO, DashboardStatisticType.RATIO, AnalysisType.USER),
SAD(StatisticsCalculationType.RATIO, DashboardStatisticType.RATIO, AnalysisType.USER);

private DashboardType(
StatisticsCalculationType statisticsCalculationType,
DashboardStatisticType dashboardStatisticType,
AnalysisType analysisType
) {
this.statisticsCalculationType = statisticsCalculationType;
this.dashboardStatisticType = dashboardStatisticType;
this.analysisType = analysisType;
}

private final StatisticsCalculationType statisticsCalculationType;
private final DashboardStatisticType dashboardStatisticType;
private final AnalysisType analysisType;

public StatisticsCalculationType getStatisticsCalculationType() {
return statisticsCalculationType;
Expand All @@ -26,4 +32,8 @@ public DashboardStatisticType getDashboardStatisticType() {
return dashboardStatisticType;
}

public AnalysisType getAnalysisType() {
return analysisType;
}

}

0 comments on commit 35418a0

Please sign in to comment.