package com.njcn.energy.pojo.param;

import com.njcn.common.pojo.constant.PatternRegex;
import com.njcn.web.constant.ValidMessage;
import com.njcn.web.pojo.param.BaseParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.*;


/**
 * @author 徐扬
 */
@Data
public class HardwareParam {

    @ApiModelProperty("id")
    @NotBlank(message = ValidMessage.ID_NOT_BLANK)
    @Pattern(regexp = PatternRegex.SYSTEM_ID, message = ValidMessage.ID_FORMAT_ERROR)
    private String id;

    @ApiModelProperty(value = "设备类型区分")
    @NotNull()
    @Range(min = 0, max = 1)
    private Integer type;

    @ApiModelProperty(value = "设备类型")
    private String devType;

    @ApiModelProperty(value = "设备名称")
    private String devName;

    @ApiModelProperty(value = "设备厂商信息")
    private String msgInfo;

    @ApiModelProperty(value = "设备状态")
    private String devStatus;

    @ApiModelProperty(value = "设备硬件版本号")
    private String hardVer;

    @ApiModelProperty(value = "CPU核心数")
    private Integer cpuCore;

    @ApiModelProperty(value = "CPU主频（单位GHz）")
    private Float cpuFreq;

    @ApiModelProperty(value = "CPU架构")
    private String arch;

    @ApiModelProperty(value = "CPU监控阈值（单位%）")
    private Float cpuLmt;

    @ApiModelProperty(value = "物理内存（单位MB）")
    private Float memPhy;

    @ApiModelProperty(value = "虚拟内存（单位MB）")
    private Float memVirt;

    @ApiModelProperty(value = "内存监控阈值（单位%）")
    private Float memLmt;

    @ApiModelProperty(value = "磁盘空间（单位MB）")
    private Float diskPhy;

    @ApiModelProperty(value = "存储监控阈值（单位%）")
    private Float diskLmt;

    @ApiModelProperty(value = "已使用磁盘空间（单位MB）")
    private Float diskUsePhy;

    @ApiModelProperty(value = "操作系统名称，裸机系统填None")
    private String osName;

    @ApiModelProperty(value = "操作系统版本，裸机系统填None")
    private String osVersion;

    @ApiModelProperty(value = "应用程序版本号")
    private String appVersion;

    @ApiModelProperty(value = "应用程序发布日期")
    private String appDate;

    @ApiModelProperty(value = "应用程序校验码")
    private String appCheck;

    @ApiModelProperty(value = "是否支持远程升级程序")
    private String softUpdate;


    /**
     * 分页查询实体
     */
    @Data
    @EqualsAndHashCode(callSuper = true)
    public static class HardwareQueryParam extends BaseParam {


    }


}
