package com.ruoyi.web.v1.model;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * 监控设备对象 monitor
 * 
 * @author coede
 * @date 2025-03-19
 */
public class Monitor extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 监控名称 */
    @Excel(name = "监控名称")
    private String monitorName;

    /** 区域Id */
    @Excel(name = "区域Id")
    private Long regionId;

    /** 设备品牌 */
    @Excel(name = "设备品牌")
    private String monitorBrand;

    /** IP */
    @Excel(name = "IP")
    private String ipAddr;

    /** wvp设备ID */
    private String deviceId;

    /** wvp通道ID */
    private String channelId;

    /** 删除标志 */
    private String delFlag;

    private Region region;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setMonitorName(String monitorName) 
    {
        this.monitorName = monitorName;
    }

    @NotBlank(message = "监控名称不能为空")
    @Size(min = 1, max = 10, message = "监控名称输入超出最大长度限制（10位）")
    public String getMonitorName() 
    {
        return monitorName;
    }

    public void setRegionId(Long regionId)
    {
        this.regionId = regionId;
    }

    @NotNull(message = "区域名称不能为空")
    public Long getRegionId()
    {
        return regionId;
    }

    public void setMonitorBrand(String monitorBrand) 
    {
        this.monitorBrand = monitorBrand;
    }

    @Size(min = 0, max = 10, message = "设备品牌输入超出最大长度限制（10位）")
    public String getMonitorBrand() 
    {
        return monitorBrand;
    }

    public void setIpAddr(String ipAddr) 
    {
        this.ipAddr = ipAddr;
    }

    @NotBlank(message = "IP不能为空")
    @Pattern(regexp = "^((25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(25[0-5]|2[0-4]\\d|[01]?\\d\\d?)$",
            message = "IPv4地址格式输入错误")
    public String getIpAddr() 
    {
        return ipAddr;
    }

    public void setDeviceId(String deviceId)
    {
        this.deviceId = deviceId;
    }

    public String getDeviceId()
    {
        return deviceId;
    }

    public void setChannelId(String channelId)
    {
        this.channelId = channelId;
    }

    public String getChannelId()
    {
        return channelId;
    }

    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    public void setRegion(Region region)
    {
        this.region = region;
    }

    public Region getRegion()
    {
        return region;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("monitorName", getMonitorName())
            .append("regionId", getRegionId())
            .append("monitorBrand", getMonitorBrand())
            .append("ipAddr", getIpAddr())
            .append("createTime", getCreateTime())
            .append("createBy", getCreateBy())
            .append("updateTime", getUpdateTime())
            .append("updateBy", getUpdateBy())
            .append("delFlag", getDelFlag())
            .append("region", getRegion())
            .toString();
    }
}
