package com.zcxk.entity.alarm;

import com.baomidou.mybatisplus.annotation.TableName;
import com.zcxk.common.Md5Util;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 数据报警管理
 * @author lihui
 * @version V1.0
 * @date 2021/5/31
 **/
@Data
@TableName("sms_data_alarm_manage")
public class DataAlarmManageEntity extends DataAlarmSetting {

    @ApiModelProperty(value = "名称")
    private String alarmName;

    public String getMd5Query(){
        StringBuffer buffer = new StringBuffer();
        buffer.append(super.getBeSceneId()).append(super.getBeDeviceId()).append(super.getBeAttributeId())
                .append(super.getBeType()).append(super.getComputeRules()).append(super.getToSceneId()).append(super.getToDeviceId())
                .append(super.getToAttributeId()).append(super.getToType()).append(super.getAlarmRules()).append(super.getAlarmValue());
        return Md5Util.hash(buffer.toString());
    }
}
