package com.shzg.project.worn.domain;

import com.shzg.framework.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.shzg.framework.aspectj.lang.annotation.Excel;

import java.util.List;

/**
 * 设备事件对象 mqtt_sensor_event
 *
 * @author shzg
 * @date 2026-04-01
 */
public class MqttSensorEvent extends BaseEntity
{
    private static final long serialVersionUID = 1L;

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

    /** 设备ID */
    @Excel(name = "设备ID")
    private Long deviceId;

    /** 部门ID（项目/仓库） */
    @Excel(name = "部门ID")
    private Long deptId;

    /** 事件类型（alarm / threshold / normal） */
    @Excel(name = "事件类型", readConverterExp = "alarm=报警,threshold=阈值,normal=正常")
    private String eventType;

    /** 事件描述 */
    @Excel(name = "事件描述")
    private String eventDesc;

    /** 等级（LOW/MEDIUM/HIGH） */
    @Excel(name = "等级", readConverterExp = "LOW=低,MEDIUM=中,HIGH=高")
    private String level;

    /** 处理状态（0未处理 1已处理） */
    @Excel(name = "处理状态", readConverterExp = "0=未处理,1=已处理")
    private String status;

    /** 删除标识 */
    @Excel(name = "删除标识")
    private String isDelete;

    private List<Long> deptIds;

    // ==================== getter / setter ====================

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

    public Long getId()
    {
        return id;
    }

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

    public Long getDeviceId()
    {
        return deviceId;
    }

    public void setDeptId(Long deptId)
    {
        this.deptId = deptId;
    }

    public Long getDeptId()
    {
        return deptId;
    }

    public void setEventType(String eventType)
    {
        this.eventType = eventType;
    }

    public String getEventType()
    {
        return eventType;
    }

    public void setEventDesc(String eventDesc)
    {
        this.eventDesc = eventDesc;
    }

    public String getEventDesc()
    {
        return eventDesc;
    }

    public void setLevel(String level)
    {
        this.level = level;
    }

    public String getLevel()
    {
        return level;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }

    public void setIsDelete(String isDelete)
    {
        this.isDelete = isDelete;
    }

    public String getIsDelete()
    {
        return isDelete;
    }

    public List<Long> getDeptIds() {
        return deptIds;
    }

    public void setDeptIds(List<Long> deptIds) {
        this.deptIds = deptIds;
    }

    // ==================== toString ====================

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("deviceId", getDeviceId())
                .append("deptId", getDeptId())
                .append("eventType", getEventType())
                .append("eventDesc", getEventDesc())
                .append("level", getLevel())
                .append("status", getStatus())
                .append("remark", getRemark())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("isDelete", getIsDelete())
                .toString();
    }
}