package org.dromara.monitoring.domain.bo;

import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.monitoring.domain.MonEquipmentList;

import java.util.Date;

/**
 * 设备列业务对象 mon_equipment_list
 *
 * @author LionLi
 * @date 2025-09-25
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = MonEquipmentList.class, reverseConvertGenerate = false)
public class MonEquipmentListBo extends BaseEntity {

    /**
     * 主键
     */
    private Long id;

    /**
     * 设备序列号
     */
    @NotBlank(message = "设备序列号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String deviceSerial;

    /**
     * 设备名称
     */
    @NotBlank(message = "设备名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String deviceName;

    /**
     * 设备型号
     */
    @NotBlank(message = "设备型号	不能为空", groups = { AddGroup.class, EditGroup.class })
    private String deviceType;

    /**
     * 设备在线状态，1-在线；0-离线
     */
    @NotNull(message = "设备在线状态，1-在线；0-离线不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long status;

    /**
     * 布撤防状态
     */
    @NotNull(message = "布撤防状态不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long defence;

    /**
     * 固件版本号
     */
    @NotBlank(message = "固件版本号	不能为空", groups = { AddGroup.class, EditGroup.class })
    private String deviceVersion;

    /**
     * 用户添加时间
     */
    @NotNull(message = "用户添加时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date addTime;

    /**
     * 设备二级类目名称
     */
    @NotBlank(message = "设备二级类目名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String parentCategory;

    /**
     * 设备风险安全等级，0-安全；大于0，有风险，风险越高，值越大
     */
    @NotNull(message = "设备风险安全等级，0-安全；大于0，有风险，风险越高，值越大不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long riskLevel;

    /**
     * 设备IP地址
     */
    @NotBlank(message = "设备IP地址不能为空", groups = { AddGroup.class, EditGroup.class })
    private String netAddress;


}
