/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.device.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import org.springblade.core.mp.base.BaseEntity;
import java.time.LocalDateTime;
import java.util.Date;

import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 设备告警实体类
 *
 * @author BladeX
 * @since 2021-04-19
 */
@Data
@TableName("smart_iot_alarm")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "IotAlarm对象", description = "设备告警")
public class IotAlarm extends BaseEntity {

	private static final long serialVersionUID = 1L;

	/**
	* 告警id
	*/
		@ApiModelProperty(value = "告警id")
		private String alarmId;
	/**
	* 告警次数
	*/
		@ApiModelProperty(value = "告警次数")
		private Integer alarmTimes;
	/**
	* 告警等级 1:严重告警,2:警告告警,3:提示告警
	*/
		@ApiModelProperty(value = "告警等级 1:严重告警,2:警告告警,3:提示告警")
		private String level;
	/**
	* 告警原因
	*/
		@ApiModelProperty(value = "告警原因")
		private String name;
	/**
	* 告警设备sn号
	*/
		@ApiModelProperty(value = "告警设备sn号")
		private String deviceId;
	/**
	* 设备名称
	*/
		@ApiModelProperty(value = "设备名称")
		private String deviceName;
	/**
	* 告警时间
	*/
		@ApiModelProperty(value = "告警时间")
		private String recordTime;
	/**
	* 设备类型
	*/
		@ApiModelProperty(value = "设备类型")
		private String deviceType;

	/**
	 * 设备类型名称
	 */
	@ApiModelProperty(value = "设备类型名称")
	private String typeName;

	/**
	* 告警类型, 0-业务告警；1-设备告警
	*/
		@ApiModelProperty(value = "告警类型, 0-业务告警；1-设备告警")
		private Integer alarmType;
	/**
	* 应用ID
	*/
		@ApiModelProperty(value = "应用ID")
		private String appId;
	/**
	* 地址前缀
	*/
		@ApiModelProperty(value = "地址前缀")
		private String prefix;
	/**
	* 工单id
	*/
		@ApiModelProperty(value = "工单id")
		private String orderId;
	/**
	* 告警数据字段，见附录
	*/
		@ApiModelProperty(value = "告警数据字段，见附录")
		private String metric;
	/**
	* 数据字段（拼接后），见附录
	*/
		@ApiModelProperty(value = "数据字段（拼接后），见附录")
		private String alarmTypeSplice;
	/**
	* 告警描述
	*/
		@ApiModelProperty(value = "告警描述")
		private String alarmDesc;
	/**
	* 仅有 1，3，4 说明：0:数据,1:告警,2: 心跳3解除单一告警,4解除所有告警
	*/
		@ApiModelProperty(value = "仅有 1，3，4 说明：0:数据,1:告警,2: 心跳3解除单一告警,4解除所有告警")
		private Integer isAlarm;
	/**
	* 原始报文数据字段，见附录
	*/
		@ApiModelProperty(value = "原始报文数据字段，见附录")
		private String alarmMetric;
	/**
	* 原始报文数据字段对应值，见附录 （阈值告警除外）
	*/
		@ApiModelProperty(value = "原始报文数据字段对应值，见附录 （阈值告警除外）")
		private String alarmValue;
	/**
	* 最新同步时间
	*/
		@ApiModelProperty(value = "最新同步时间")
		private LocalDateTime lastSyncDate;
	/**
	* 最新告警上报时间
	*/
		@ApiModelProperty(value = "最新告警上报时间")
		private Date lastNoticeDate;
	/**
	* 监测值
	*/
		@ApiModelProperty(value = "监测值")
		private String monitorValue;

	/**
	 * 租户id
	 */
	@ApiModelProperty(value = "租户id")
	private String tenantId;

	private String orgPosition;


}
