package com.shzg.project.worn.domain;

import java.math.BigDecimal;
import java.util.List;

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;

/**
 * 传感器阈值配置对象 mqtt_sensor_threshold
 *
 * @author shzg
 * @date 2026-04-01
 */
public class MqttSensorThreshold extends BaseEntity
{
    private static final long serialVersionUID = 1L;

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

    /** 设备ID（关联 mqtt_sensor_device.id） */
    @Excel(name = "设备ID")
    private Long deviceId;

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

    /** 数据权限（部门ID集合，用于数据隔离） */
    private List<Long> deptIds;

    /** 指标类型（temperature/humidity/nh3/h2s/battery） */
    @Excel(name = "指标类型")
    private String metricType;

    /** 预警最小值 */
    @Excel(name = "预警最小值")
    private BigDecimal warnMin;

    /** 预警最大值 */
    @Excel(name = "预警最大值")
    private BigDecimal warnMax;

    /** 报警最小值 */
    @Excel(name = "报警最小值")
    private BigDecimal alarmMin;

    /** 报警最大值 */
    @Excel(name = "报警最大值")
    private BigDecimal alarmMax;

    /** 单位（℃/%/ppm） */
    @Excel(name = "单位")
    private String unit;

    /** 状态（1启用 0停用） */
    @Excel(name = "状态")
    private String status;

    /** 是否删除（0正常 1删除） */
    @Excel(name = "是否删除")
    private String isDelete;

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

    public Long getId() {
        return id;
    }

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

    public Long getDeviceId() {
        return deviceId;
    }

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

    public Long getDeptId() {
        return deptId;
    }

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

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

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

    public String getMetricType() {
        return metricType;
    }

    public void setMetricType(String metricType) {
        this.metricType = metricType;
    }

    public BigDecimal getWarnMin() {
        return warnMin;
    }

    public void setWarnMin(BigDecimal warnMin) {
        this.warnMin = warnMin;
    }

    public BigDecimal getWarnMax() {
        return warnMax;
    }

    public void setWarnMax(BigDecimal warnMax) {
        this.warnMax = warnMax;
    }

    public BigDecimal getAlarmMin() {
        return alarmMin;
    }

    public void setAlarmMin(BigDecimal alarmMin) {
        this.alarmMin = alarmMin;
    }

    public BigDecimal getAlarmMax() {
        return alarmMax;
    }

    public void setAlarmMax(BigDecimal alarmMax) {
        this.alarmMax = alarmMax;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getStatus() {
        return status;
    }

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

    public String getIsDelete() {
        return isDelete;
    }

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

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

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("deviceId", getDeviceId())
                .append("deptId", getDeptId())
                .append("metricType", getMetricType())
                .append("warnMin", getWarnMin())
                .append("warnMax", getWarnMax())
                .append("alarmMin", getAlarmMin())
                .append("alarmMax", getAlarmMax())
                .append("unit", getUnit())
                .append("status", getStatus())
                .append("remark", getRemark())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("isDelete", getIsDelete())
                .toString();
    }
}