package org.dromara.ems.record.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import cn.idev.excel.annotation.format.DateTimeFormat;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 异常数据记录对象 ems_record_alarm_data
 *
 * @author Yinq
 * @date 2024-05-15
 */
@ExcelIgnoreUnannotated
public class EmsRecordAlarmData extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 自增标识 */
    private Long objId;

    /** 计量设备编号 */
    @ExcelProperty(value = "计量设备编号")
    private String monitorId;

    /** 计量设备名称 */
    @ExcelProperty(value = "计量设备名称")
    private String monitorName;

    /** 采集设备编号 */
    @ExcelProperty(value = "采集设备编号")
    private String collectDeviceId;

    /** 采集设备名称 */
    @ExcelProperty(value = "采集设备名称")
    private String collectDeviceName;

    /** 记录时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    @ExcelProperty(value = "记录时间")
    private Date collectTime;

    /** 异常类型（0超过阈值 1小于阈值）） */
//    @Excel(name = "异常类型", readConverterExp = "0=超过阈值,1=小于阈值")
    private Long alarmType;

    /** 异常状态（0已处理 1未处理） */
    @ExcelProperty(value = "异常状态")
    private Long alarmStatus;

    /** 异常数据 */
    @ExcelProperty(value = "异常数据")
    private String alarmData;

    /** 操作人员 */
    @ExcelProperty(value = "操作人员")
    private String operationName;

    /** 操作时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    @ExcelProperty(value = "操作时间")
    private Date operationTime;

    private String beginOperationTime;
    private String endOperationTime;

    /** 原因 */
    @ExcelProperty(value = "原因")
    private String cause;

    /** 通知用户 */
//    @Excel(name = "通知用户")
    private String notifyUser;

    /** 统一设备名称 */
    private String deviceName;

    public String getBeginOperationTime() {
        return beginOperationTime;
    }

    public void setBeginOperationTime(String beginOperationTime) {
        this.beginOperationTime = beginOperationTime;
    }

    public String getEndOperationTime() {
        return endOperationTime;
    }

    public void setEndOperationTime(String endOperationTime) {
        this.endOperationTime = endOperationTime;
    }

    public String getMonitorName() {
        return monitorName;
    }

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

    public String getCollectDeviceName() {
        return collectDeviceName;
    }

    public void setCollectDeviceName(String collectDeviceName) {
        this.collectDeviceName = collectDeviceName;
    }

    public String getDeviceName() {
        return deviceName;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    public void setObjId(Long objId)
    {
        this.objId = objId;
    }

    public Long getObjId()
    {
        return objId;
    }
    public void setMonitorId(String monitorId)
    {
        this.monitorId = monitorId;
    }

    public String getMonitorId()
    {
        return monitorId;
    }
    public void setCollectDeviceId(String collectDeviceId)
    {
        this.collectDeviceId = collectDeviceId;
    }

    public String getCollectDeviceId()
    {
        return collectDeviceId;
    }
    public void setCollectTime(Date collectTime)
    {
        this.collectTime = collectTime;
    }

    public Date getCollectTime()
    {
        return collectTime;
    }
    public void setAlarmType(Long alarmType)
    {
        this.alarmType = alarmType;
    }

    public Long getAlarmType()
    {
        return alarmType;
    }
    public void setAlarmStatus(Long alarmStatus)
    {
        this.alarmStatus = alarmStatus;
    }

    public Long getAlarmStatus()
    {
        return alarmStatus;
    }
    public void setAlarmData(String alarmData)
    {
        this.alarmData = alarmData;
    }

    public String getAlarmData()
    {
        return alarmData;
    }
    public void setOperationName(String operationName)
    {
        this.operationName = operationName;
    }

    public String getOperationName()
    {
        return operationName;
    }
    public void setOperationTime(Date operationTime)
    {
        this.operationTime = operationTime;
    }

    public Date getOperationTime()
    {
        return operationTime;
    }
    public void setCause(String cause)
    {
        this.cause = cause;
    }

    public String getCause()
    {
        return cause;
    }
    public void setNotifyUser(String notifyUser)
    {
        this.notifyUser = notifyUser;
    }

    public String getNotifyUser()
    {
        return notifyUser;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("objId", getObjId())
            .append("monitorId", getMonitorId())
            .append("collectDeviceId", getCollectDeviceId())
            .append("collectTime", getCollectTime())
            .append("alarmType", getAlarmType())
            .append("alarmStatus", getAlarmStatus())
            .append("alarmData", getAlarmData())
            .append("operationName", getOperationName())
            .append("operationTime", getOperationTime())
            .append("cause", getCause())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("notifyUser", getNotifyUser())
            .toString();
    }
}
