diff --git a/coder-common-thin-model/src/main/java/org/leocoder/thin/domain/model/vo/system/DashboardStatisticsVo.java b/coder-common-thin-model/src/main/java/org/leocoder/thin/domain/model/vo/system/DashboardStatisticsVo.java new file mode 100644 index 0000000..2d2c0ac --- /dev/null +++ b/coder-common-thin-model/src/main/java/org/leocoder/thin/domain/model/vo/system/DashboardStatisticsVo.java @@ -0,0 +1,221 @@ +package org.leocoder.thin.domain.model.vo.system; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * 仪表盘统计数据响应对象 + * + * @author Leocoder + */ +@Data +@JsonInclude(JsonInclude.Include.NON_NULL) +public class DashboardStatisticsVo implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 用户统计数据 + */ + @JsonProperty("userStats") + private UserStatsVo userStats; + + /** + * 登录统计数据 + */ + @JsonProperty("loginStats") + private LoginStatsVo loginStats; + + /** + * 存储统计数据 + */ + @JsonProperty("storageStats") + private StorageStatsVo storageStats; + + /** + * 今日活跃统计数据 + */ + @JsonProperty("dailyActivityStats") + private DailyActivityStatsVo dailyActivityStats; + + /** + * 用户统计数据 + */ + @Data + public static class UserStatsVo implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 总用户数 + */ + @JsonProperty("totalUsers") + private Integer totalUsers; + + /** + * 今日新增用户数 + */ + @JsonProperty("todayNewUsers") + private Integer todayNewUsers; + + /** + * 活跃用户数 + */ + @JsonProperty("activeUsers") + private Integer activeUsers; + + /** + * 当前在线用户数 + */ + @JsonProperty("onlineUsers") + private Integer onlineUsers; + } + + /** + * 登录统计数据 + */ + @Data + public static class LoginStatsVo implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 今日登录次数 + */ + @JsonProperty("todayLogins") + private Integer todayLogins; + + /** + * 累计登录次数 + */ + @JsonProperty("totalLogins") + private Integer totalLogins; + + /** + * 登录趋势数据 + */ + @JsonProperty("loginTrend") + private List loginTrend; + } + + /** + * 存储统计数据 + */ + @Data + public static class StorageStatsVo implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 总文件数 + */ + @JsonProperty("totalFiles") + private Integer totalFiles; + + /** + * 总图片数 + */ + @JsonProperty("totalImages") + private Integer totalImages; + + /** + * 总存储大小(格式化) + */ + @JsonProperty("totalSize") + private String totalSize; + + /** + * 今日上传文件数 + */ + @JsonProperty("todayUploads") + private Integer todayUploads; + + /** + * 存储使用率(百分比) + */ + @JsonProperty("storageUsage") + private Double storageUsage; + + /** + * 可用空间(格式化) + */ + @JsonProperty("availableSpace") + private String availableSpace; + } + + /** + * 今日活跃统计数据 + */ + @Data + public static class DailyActivityStatsVo implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 今日访问量 + */ + @JsonProperty("todayVisits") + private Integer todayVisits; + + /** + * 今日操作数 + */ + @JsonProperty("todayOperations") + private Integer todayOperations; + + /** + * 活跃用户数 + */ + @JsonProperty("activeUsers") + private Integer activeUsers; + + /** + * 新增内容数 + */ + @JsonProperty("newContent") + private Integer newContent; + + /** + * API调用次数 + */ + @JsonProperty("apiCalls") + private Integer apiCalls; + + /** + * 平均响应时间(毫秒) + */ + @JsonProperty("avgResponseTime") + private Integer avgResponseTime; + } + + /** + * 登录趋势项 + */ + @Data + public static class LoginTrendItemVo implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 日期(YYYY-MM-DD格式) + */ + @JsonProperty("date") + private String date; + + /** + * 当日登录次数 + */ + @JsonProperty("count") + private Integer count; + + /** + * 显示标签(用于图表展示) + */ + @JsonProperty("label") + private String label; + } +} diff --git a/coder-common-thin-model/src/main/java/org/leocoder/thin/domain/model/vo/system/LoginTrendVo.java b/coder-common-thin-model/src/main/java/org/leocoder/thin/domain/model/vo/system/LoginTrendVo.java new file mode 100644 index 0000000..cab281f --- /dev/null +++ b/coder-common-thin-model/src/main/java/org/leocoder/thin/domain/model/vo/system/LoginTrendVo.java @@ -0,0 +1,53 @@ +package org.leocoder.thin.domain.model.vo.system; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * 登录趋势数据响应对象 + * + * @author Leocoder + */ +@Data +@JsonInclude(JsonInclude.Include.NON_NULL) +public class LoginTrendVo implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 登录趋势数据列表 + */ + @JsonProperty("loginTrend") + private List loginTrend; + + /** + * 登录趋势项 + */ + @Data + public static class LoginTrendItemVo implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 日期(YYYY-MM-DD格式) + */ + @JsonProperty("date") + private String date; + + /** + * 当日登录次数 + */ + @JsonProperty("count") + private Integer count; + + /** + * 显示标签(用于图表展示) + */ + @JsonProperty("label") + private String label; + } +}