package com.aucma.base.domain;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.aucma.common.annotation.Excel;
import com.aucma.common.core.domain.BaseEntity;

/**
 * 设备参数对象 base_deviceparam
 *
 * @author Yinq
 * @date 2023-09-19
 */
public class BaseDeviceParam extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键标识
     */
    private Long objId;

    /**
     * 产线名称
     */
    @Excel(name = "产线名称", type = Excel.Type.EXPORT)
    private String productLineName;

    /**
     * 参数编号
     */
    @Excel(name = "参数编号")
    private String paramCode;

    /**
     * 参数名称
     */
    @Excel(name = "参数名称")
    private String paramName;

    /**
     * 网络地址
     */
    @Excel(name = "网络地址")
    private String paramNetwork;

    /**
     * 参数地址
     */
    @Excel(name = "参数地址")
    private String paramAddress;

    /**
     * 参数类型
     * 曹启龙：统一小写，1=udint,2=dint,3=lshort,4=long,5=float,6=boolean,7=string
     */
//    @Excel(name = "参数类型", readConverterExp = "1=浮点数,2=整数,3=字符类型,4=布尔类型")
    @Excel(name = "参数类型", readConverterExp = "1=udint,2=dint,3=lshort,4=long,5=float,6=boolean,7=string")
    private String paramType;

    /**
     * 设备编号
     */
    @Excel(name = "设备编号")
    private String deviceCode;

    /**
     * 设备名称
     */
    @Excel(name = "设备名称", type = Excel.Type.EXPORT)
    private String deviceName;

    /**
     * 读取频率（毫秒）
     */
    @Excel(name = "读取频率")
    private Long readFrequency;

    /**
     * 参数上限阈值
     */
    @Excel(name = "上限阈值")
    private Double upperLimit;

    /**
     * 参数下限阈值
     */
    @Excel(name = "下限阈值")
    private Double lowerLimit;

    /**
     * 预警级别(1一般/2重要/3紧急)
     */
    @Excel(name = "预警级别", readConverterExp = "1=一般,2=重要,3=紧急")
    private String alertLevel;

    /**
     * 是否启用预警(0否/1是)
     */
    @Excel(name = "启用预警", readConverterExp = "0=否,1=是")
    private String alertEnabled;

    /**
     * 启用标识
     */
    @Excel(name = "启用标识", readConverterExp = "1=有效,0=无效")
    private Long isFlag;

    /**
     * 创建人
     */
    @Excel(name = "创建人", type = Excel.Type.EXPORT)
    private String createdBy;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Excel.Type.EXPORT)
    private Date createdTime;

    /**
     * 更新人
     */
    @Excel(name = "更新人", type = Excel.Type.EXPORT)
    private String updatedBy;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Excel.Type.EXPORT)
    private Date updatedTime;

    public String getProductLineName() {
        return productLineName;
    }

    public void setProductLineName(String productLineName) {
        this.productLineName = productLineName;
    }

    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 setParamCode(String paramCode) {
        this.paramCode = paramCode;
    }

    public String getParamCode() {
        return paramCode;
    }

    public void setParamName(String paramName) {
        this.paramName = paramName;
    }

    public String getParamName() {
        return paramName;
    }

    public void setParamNetwork(String paramNetwork) {
        this.paramNetwork = paramNetwork;
    }

    public String getParamNetwork() {
        return paramNetwork;
    }

    public void setParamAddress(String paramAddress) {
        this.paramAddress = paramAddress;
    }

    public String getParamAddress() {
        return paramAddress;
    }

    public void setParamType(String paramType) {
        this.paramType = paramType;
    }

    public String getParamType() {
        return paramType;
    }

    public void setDeviceCode(String deviceCode) {
        this.deviceCode = deviceCode;
    }

    public String getDeviceCode() {
        return deviceCode;
    }

    public void setReadFrequency(Long readFrequency) {
        this.readFrequency = readFrequency;
    }

    public Long getReadFrequency() {
        return readFrequency;
    }

    public void setIsFlag(Long isFlag) {
        this.isFlag = isFlag;
    }

    public Long getIsFlag() {
        return isFlag;
    }

    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    public String getCreatedBy() {
        return createdBy;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setUpdatedBy(String updatedBy) {
        this.updatedBy = updatedBy;
    }

    public String getUpdatedBy() {
        return updatedBy;
    }

    public void setUpdatedTime(Date updatedTime) {
        this.updatedTime = updatedTime;
    }

    public Date getUpdatedTime() {
        return updatedTime;
    }

    public Double getUpperLimit() {
        return upperLimit;
    }

    public void setUpperLimit(Double upperLimit) {
        this.upperLimit = upperLimit;
    }

    public Double getLowerLimit() {
        return lowerLimit;
    }

    public void setLowerLimit(Double lowerLimit) {
        this.lowerLimit = lowerLimit;
    }

    public String getAlertLevel() {
        return alertLevel;
    }

    public void setAlertLevel(String alertLevel) {
        this.alertLevel = alertLevel;
    }

    public String getAlertEnabled() {
        return alertEnabled;
    }

    public void setAlertEnabled(String alertEnabled) {
        this.alertEnabled = alertEnabled;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("objId", getObjId())
                .append("paramCode", getParamCode())
                .append("paramName", getParamName())
                .append("paramNetwork", getParamNetwork())
                .append("paramAddress", getParamAddress())
                .append("paramType", getParamType())
                .append("deviceCode", getDeviceCode())
                .append("readFrequency", getReadFrequency())
                .append("isFlag", getIsFlag())
                .append("createdBy", getCreatedBy())
                .append("createdTime", getCreatedTime())
                .append("updatedBy", getUpdatedBy())
                .append("updatedTime", getUpdatedTime())
                .toString();
    }
}
