package org.jk.rag.domain.bo;


import org.jk.common.core.validate.AddGroup;
import org.jk.common.core.validate.EditGroup;
import org.jk.common.mybatis.core.domain.BaseEntity;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import org.jk.rag.domain.ServerMemoryMonitor;

/**
 * 服务器内存状态监控-独立业务对象 server_memory_monitor
 *
 * @author Lion Li
 * @date 2026-01-19
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = ServerMemoryMonitor.class, reverseConvertGenerate = false)
public class ServerMemoryMonitorBo extends BaseEntity {

    /**
     * 主键ID，雪花算法生成，全局唯一
     */
    @NotNull(message = "主键ID，雪花算法生成，全局唯一不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 关联服务器基础表ID
     */
    @NotNull(message = "关联服务器基础表ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long serverId;

    /**
     * 服务器IP地址
     */
    @NotBlank(message = "服务器IP地址不能为空", groups = { AddGroup.class, EditGroup.class })
    private String serverIp;

    /**
     * 服务器名称
     */
    @NotBlank(message = "服务器名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String serverName;

    /**
     * 总内存(MB)
     */
    @NotNull(message = "总内存(MB)不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long memTotal;

    /**
     * 已使用内存(MB)
     */
    @NotNull(message = "已使用内存(MB)不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long memUsed;

    /**
     * 空闲内存(MB)
     */
    @NotNull(message = "空闲内存(MB)不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long memFree;

    /**
     * 内存使用率(%)，0-100.00
     */
    @NotNull(message = "内存使用率(%)，0-100.00不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long memUsage;

    /**
     * 交换分区总大小(MB)
     */
    private Long swapTotal;

    /**
     * 交换分区已使用(MB)
     */
    private Long swapUsed;

    /**
     * 交换分区使用率(%)
     */
    private Long swapUsage;


}
