package com.zd.laboratory.domain;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.zd.common.core.annotation.Excel;
import com.zd.common.core.enums.SenseStateEnum;
import com.zd.common.core.enums.SenseType;
import com.zd.common.core.valid.ValidGroup;
import com.zd.common.core.web.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotNull;

/**
 * 传感器对象 lab_sensor
 *
 * @author zd
 * @date 2021-08-30
 */
@ApiModel("传感器表")
public class LabSensor extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @NotNull(groups = ValidGroup.Crud.Update.class ,message = "主键id不能为空")
    @ApiModelProperty(value = "${comment}")
    private Long id;

    /**
     * 传感器名称
     */
    @ApiModelProperty(value = "传感器名称")
    @Excel(name = "传感器名称")
    private String name;

    /**
     * 传感器厂家
     */
    @ApiModelProperty(value = "传感器厂家")
    @Excel(name = "传感器厂家")
    private String factory;

    /**
     * 传感器类型（查看字典表）
     */
    @ApiModelProperty(value = "传感器类型（查看字典表）")
    @Excel(name = "传感器类型", readConverterExp = "查=看字典表")
    private SenseType type;

    /**
     * 网关编号
     */
    @ApiModelProperty(value = "网关编号")
    @Excel(name = "网关编号", readConverterExp = "网关编号")
    private String gatewayId;

    /**
     * 检测数据
     */
    @ApiModelProperty(value = "检测数据")
    @Excel(name = "检测数据")
    private Integer senseData;

    @JsonProperty(access = JsonProperty.Access.READ_ONLY)
    @ApiModelProperty(value = "传感器状态")
    private SenseStateEnum senseState;

    /**
     * 数据上限
     */
    @ApiModelProperty(value = "数据上限")
    @Excel(name = "数据上限")
    private Integer dataUpper;

    /**
     * 数据下限
     */
    @ApiModelProperty(value = "数据下限")
    @Excel(name = "数据下限")
    private Integer dataLower;

    /**
     * mac地址
     */
    @ApiModelProperty(value = "mac地址")
    @Excel(name = "mac地址")
    private String macAdd;

    /**
     * 关联实验室id
     */
    @ApiModelProperty(value = "关联实验室id")
    @Excel(name = "关联实验室id")
    private Long subjectId;

    @ApiModelProperty(value = "路由")
    private Integer routeNum;

    @ApiModelProperty(value = "传感器配置名称")
    private String  configName;

    @ApiModelProperty(value = "传感器状态名称")
    private String  configStatus;


    public Integer getRouteNum() {
        return routeNum;
    }

    public void setRouteNum(Integer routeNum) {
        this.routeNum = routeNum;
    }

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

    public Long getId() {
        return id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setFactory(String factory) {
        this.factory = factory;
    }

    public String getFactory() {
        return factory;
    }

    public void setType(SenseType type) {
        this.type = type;
    }

    public SenseType getType() {
        return type;
    }

    public String getGatewayId() {
        return gatewayId;
    }

    public void setGatewayId(String gatewayId) {
        this.gatewayId = gatewayId;
    }

    public void setDataUpper(Integer dataUpper) {
        this.dataUpper = dataUpper;
    }

    public Integer getDataUpper() {
        return dataUpper;
    }

    public void setDataLower(Integer dataLower) {
        this.dataLower = dataLower;
    }

    public Integer getDataLower() {
        return dataLower;
    }

    public void setMacAdd(String macAdd) {
        this.macAdd = macAdd;
    }

    public String getMacAdd() {
        return macAdd;
    }

    public void setSubjectId(Long subjectId) {
        this.subjectId = subjectId;
    }

    public Long getSubjectId() {
        return subjectId;
    }

    public Integer getSenseData() {
        return senseData;
    }

    public void setSenseData(Integer senseData) {
        this.senseData = senseData;
    }

    public SenseStateEnum getSenseState() {
        return senseState;
    }

    public void setSenseState(SenseStateEnum senseState) {
        this.senseState = senseState;
    }

    public String getConfigName() {
        return configName;
    }

    public void setConfigName(String configName) {
        this.configName = configName;
    }

    public String getConfigStatus() {
        return configStatus;
    }

    public void setConfigStatus(String configStatus) {
        this.configStatus = configStatus;
    }
}
