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.ServerGpuMonitor;

/**
 * 服务器GPU状态监控-独立业务对象 server_gpu_monitor
 *
 * @author Lion Li
 * @date 2026-01-19
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = ServerGpuMonitor.class, reverseConvertGenerate = false)
public class ServerGpuMonitorBo 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;

    /**
     * GPU卡号，如：0 1 2，多卡区分
     */
    @NotNull(message = "GPU卡号，如：0 1 2，多卡区分不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long gpuCardNo;

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

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

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

    /**
     * GPU核心温度(℃)
     */
    private Long gpuTemp;


}
