package com.tourguide.modules.dashboard.dto;
|
|
import java.math.BigDecimal;
|
import java.util.List;
|
|
public class DashboardResponse {
|
private final long userCount;
|
private final long orderCount;
|
private final long reviewCount;
|
private final BigDecimal dailyOrderGrowth;
|
private final BigDecimal totalRevenue;
|
private final List<TrendPoint> revenueTrend;
|
private final List<ScenicRank> scenicRanking;
|
private final List<OrderTypeStat> orderTypeStats;
|
|
public DashboardResponse(long userCount, long orderCount, long reviewCount,
|
BigDecimal dailyOrderGrowth, BigDecimal totalRevenue,
|
List<TrendPoint> revenueTrend, List<ScenicRank> scenicRanking,
|
List<OrderTypeStat> orderTypeStats) {
|
this.userCount = userCount;
|
this.orderCount = orderCount;
|
this.reviewCount = reviewCount;
|
this.dailyOrderGrowth = dailyOrderGrowth;
|
this.totalRevenue = totalRevenue;
|
this.revenueTrend = revenueTrend;
|
this.scenicRanking = scenicRanking;
|
this.orderTypeStats = orderTypeStats;
|
}
|
|
public long getUserCount() { return userCount; }
|
public long getOrderCount() { return orderCount; }
|
public long getReviewCount() { return reviewCount; }
|
public BigDecimal getDailyOrderGrowth() { return dailyOrderGrowth; }
|
public BigDecimal getTotalRevenue() { return totalRevenue; }
|
public List<TrendPoint> getRevenueTrend() { return revenueTrend; }
|
public List<ScenicRank> getScenicRanking() { return scenicRanking; }
|
public List<OrderTypeStat> getOrderTypeStats() { return orderTypeStats; }
|
|
public static class TrendPoint {
|
private final String dateLabel;
|
private final BigDecimal revenue;
|
public TrendPoint(String dateLabel, BigDecimal revenue) { this.dateLabel = dateLabel; this.revenue = revenue; }
|
public String getDateLabel() { return dateLabel; }
|
public BigDecimal getRevenue() { return revenue; }
|
}
|
|
public static class ScenicRank {
|
private final int rank;
|
private final String scenicName;
|
private final long orderCount;
|
private final BigDecimal growthRate;
|
public ScenicRank(int rank, String scenicName, long orderCount, BigDecimal growthRate) {
|
this.rank = rank; this.scenicName = scenicName; this.orderCount = orderCount; this.growthRate = growthRate;
|
}
|
public int getRank() { return rank; }
|
public String getScenicName() { return scenicName; }
|
public long getOrderCount() { return orderCount; }
|
public BigDecimal getGrowthRate() { return growthRate; }
|
}
|
|
public static class OrderTypeStat {
|
private final String orderType;
|
private final long orderCount;
|
private final BigDecimal percentage;
|
public OrderTypeStat(String orderType, long orderCount, BigDecimal percentage) {
|
this.orderType = orderType; this.orderCount = orderCount; this.percentage = percentage;
|
}
|
public String getOrderType() { return orderType; }
|
public long getOrderCount() { return orderCount; }
|
public BigDecimal getPercentage() { return percentage; }
|
}
|
}
|