sakthivikram/geo-location
0
1package com.georeport.dto;2 3import lombok.Builder;4import lombok.Data;5 6import java.util.List;7import java.util.Map;8 9/**10 * Response DTO for analytics data.11 */12@Data13@Builder14public class AnalyticsResponse {15 16 /**17 * Issue count by status18 */19 private Map<String, Long> byStatus;20 21 /**22 * Issue count by category23 */24 private Map<String, Long> byCategory;25 26 /**27 * Issue count by priority28 */29 private Map<String, Long> byPriority;30 31 /**32 * Issue count by ward33 */34 private Map<String, Long> byWard;35 36 /**37 * Issues over time (for trend chart)38 * Key: date string (YYYY-MM-DD), Value: count39 */40 private Map<String, Long> issueTrends;41 42 /**43 * Average resolution time in hours by category44 */45 private Map<String, Double> avgResolutionTimeByCategory;46 47 /**48 * Hotspot data for heatmap (lat, lng, intensity)49 */50 private List<HotspotData> hotspots;51 52 /**53 * Overall statistics54 */55 private OverallStats overall;56 57 @Data58 @Builder59 public static class HotspotData {60 private Double latitude;61 private Double longitude;62 private Long count;63 }64 65 @Data66 @Builder67 public static class OverallStats {68 private Long totalIssues;69 private Long resolvedThisMonth;70 private Long newThisWeek;71 private Double avgResolutionTimeHours;72 private Double resolutionRate; // percentage73 }74}75 