package com.qqchen.deploy.backend.deploy.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.time.Duration;

/**
 * 监控时间范围枚举
 */
@Getter
@AllArgsConstructor
public enum MonitorTimeRange {
    LAST_1_HOUR("LAST_1_HOUR", "最近1小时", Duration.ofHours(1), "5m"),
    LAST_6_HOURS("LAST_6_HOURS", "最近6小时", Duration.ofHours(6), "5m"),
    LAST_24_HOURS("LAST_24_HOURS", "最近24小时", Duration.ofHours(24), "15m"),
    LAST_7_DAYS("LAST_7_DAYS", "最近7天", Duration.ofDays(7), "1h"),
    LAST_30_DAYS("LAST_30_DAYS", "最近30天", Duration.ofDays(30), "4h");

    private final String code;
    private final String name;
    private final Duration duration;
    private final String defaultInterval;
}
