package com.ruoyi.system.domain.monitor;

import java.util.Date;

/**
 * 接口调用统计（按 http_method + url_pattern 聚合）
 *
 * 用于后续重构分析：哪些接口还在用、调用频率、耗时分布。
 *
 * @author ruoyi
 */
public class ApiCallStats
{
    private Long id;

    /** 请求方式 GET/POST/PUT/DELETE */
    private String httpMethod;

    /** 接口路径模式（带占位符，如 /xxx/{id}） */
    private String urlPattern;

    /** 处理器类全限定名 */
    private String handlerClass;

    /** 处理器方法名 */
    private String handlerMethod;

    /** 累计调用次数 */
    private Long callCount;

    /** 累计耗时(ms) */
    private Long totalCostMs;

    /** 最大耗时(ms) */
    private Long maxCostMs;

    /** 最小耗时(ms) */
    private Long minCostMs;

    /** 最近一次耗时(ms) */
    private Long lastCostMs;

    /** 异常次数 */
    private Long errorCount;

    /** 首次调用时间 */
    private Date firstCallTime;

    /** 最近调用时间 */
    private Date lastCallTime;

    public Long getId()
    {
        return id;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public String getHttpMethod()
    {
        return httpMethod;
    }

    public void setHttpMethod(String httpMethod)
    {
        this.httpMethod = httpMethod;
    }

    public String getUrlPattern()
    {
        return urlPattern;
    }

    public void setUrlPattern(String urlPattern)
    {
        this.urlPattern = urlPattern;
    }

    public String getHandlerClass()
    {
        return handlerClass;
    }

    public void setHandlerClass(String handlerClass)
    {
        this.handlerClass = handlerClass;
    }

    public String getHandlerMethod()
    {
        return handlerMethod;
    }

    public void setHandlerMethod(String handlerMethod)
    {
        this.handlerMethod = handlerMethod;
    }

    public Long getCallCount()
    {
        return callCount;
    }

    public void setCallCount(Long callCount)
    {
        this.callCount = callCount;
    }

    public Long getTotalCostMs()
    {
        return totalCostMs;
    }

    public void setTotalCostMs(Long totalCostMs)
    {
        this.totalCostMs = totalCostMs;
    }

    public Long getMaxCostMs()
    {
        return maxCostMs;
    }

    public void setMaxCostMs(Long maxCostMs)
    {
        this.maxCostMs = maxCostMs;
    }

    public Long getMinCostMs()
    {
        return minCostMs;
    }

    public void setMinCostMs(Long minCostMs)
    {
        this.minCostMs = minCostMs;
    }

    public Long getLastCostMs()
    {
        return lastCostMs;
    }

    public void setLastCostMs(Long lastCostMs)
    {
        this.lastCostMs = lastCostMs;
    }

    public Long getErrorCount()
    {
        return errorCount;
    }

    public void setErrorCount(Long errorCount)
    {
        this.errorCount = errorCount;
    }

    public Date getFirstCallTime()
    {
        return firstCallTime;
    }

    public void setFirstCallTime(Date firstCallTime)
    {
        this.firstCallTime = firstCallTime;
    }

    public Date getLastCallTime()
    {
        return lastCallTime;
    }

    public void setLastCallTime(Date lastCallTime)
    {
        this.lastCallTime = lastCallTime;
    }
}
