package com.qqchen.deploy.backend.deploy.dto;

import com.qqchen.deploy.backend.framework.dto.DiskUsageInfo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 服务器监控数据DTO
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "服务器监控数据")
public class ServerMonitorDataDTO {

    @Schema(description = "服务器ID")
    private Long serverId;

    @Schema(description = "CPU使用率(%)")
    private BigDecimal cpuUsage;

    @Schema(description = "内存使用率(%)")
    private BigDecimal memoryUsage;

    @Schema(description = "已用内存(GB)")
    private Integer memoryUsed;

    @Schema(description = "各分区磁盘使用率")
    private List<DiskUsageInfo> diskUsage;

    @Schema(description = "网络接收累计流量(KB) - 用于数据库存储")
    private Long networkRx;

    @Schema(description = "网络发送累计流量(KB) - 用于数据库存储")
    private Long networkTx;

    @Schema(description = "网络接收速率(KB/s) - 用于告警检查")
    private Long networkRxSpeed;

    @Schema(description = "网络发送速率(KB/s) - 用于告警检查")
    private Long networkTxSpeed;

    @Schema(description = "采集时间")
    private LocalDateTime collectTime;
}
