package com.lesingle.creation.vo.log;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

/**
 * 日志统计响应 VO
 */
@Data
@Schema(description = "日志统计响应")
public class LogStatisticsVO {

    @Schema(description = "总日志数")
    private Long totalCount;

    @Schema(description = "近期日志数")
    private Long recentCount;

    @Schema(description = "统计天数")
    private Integer days;

    @Schema(description = "按操作类型统计列表")
    private List<ActionStatVO> actionStats;

    @Schema(description = "按天统计列表")
    private List<DailyStatVO> dailyStats;

    /**
     * 操作类型统计 VO
     */
    @Data
    @Schema(description = "操作类型统计")
    public static class ActionStatVO {
        @Schema(description = "操作类型")
        private String action;
        @Schema(description = "数量")
        private Long count;
    }

    /**
     * 按天统计 VO
     */
    @Data
    @Schema(description = "按天统计")
    public static class DailyStatVO {
        @Schema(description = "日期")
        private String date;
        @Schema(description = "数量")
        private Long count;
    }
}
