package com.seer.teach.common.cache.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.time.LocalDateTime;

/**
 *
 * <p>
 *
 * </p >
 *
 * @author Captain
 * @since 2025-10-26 18:28
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class DeviceMetricDTO {

    private Integer cityId;

    private String deviceIp;

    private String nettyIp;

    private double cpu;

    private double memory;

    private LocalDateTime updateTime;

    public static DeviceMetricDTO get(Integer cityId,String deviceIp,String nettyIp,double cpu,double memory){
        return new DeviceMetricDTO(cityId,deviceIp,nettyIp,cpu,memory,LocalDateTime.now());
    }

    public static DeviceMetricDTO defaultMetric(Integer cityId,String deviceIp,String nettyIp){
        return new DeviceMetricDTO(cityId,deviceIp,nettyIp,0,0,LocalDateTime.now());
    }
}