package com.xzzn.ems.domain;

import com.xzzn.common.annotation.Excel;
import com.xzzn.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;

/**
 * 点位配置对象 ems_point_config
 */
public class EmsPointConfig extends BaseEntity {
    private static final long serialVersionUID = 1L;

    private Long id;

    @Excel(name = "点位ID")
    private String pointId;

    @Excel(name = "站点ID")
    private String siteId;

    @Excel(name = "设备类型")
    private String deviceCategory;

    @Excel(name = "设备ID")
    private String deviceId;

    @Excel(name = "点位名称")
    private String pointName;

    @Excel(name = "数据键")
    private String dataKey;

    @Excel(name = "点位描述")
    private String pointDesc;

    @Excel(name = "寄存器地址")
    private String registerAddress;

    @Excel(name = "单位")
    private String dataUnit;

    @Excel(name = "A系数")
    private BigDecimal dataA;

    @Excel(name = "K系数")
    private BigDecimal dataK;

    @Excel(name = "B系数")
    private BigDecimal dataB;

    @Excel(name = "位偏移")
    private Integer dataBit;

    @Excel(name = "是否报警点位", readConverterExp = "0=否,1=是")
    private Integer isAlarm;

    @Excel(name = "点位类型")
    private String pointType;

    @Excel(name = "计算表达式")
    private String calcExpression;

    @Excel(name = "是否启用采集", readConverterExp = "0=否,1=是")
    private Integer collectEnabled;

    @Excel(name = "采集来源")
    private String collectSource;

    @Excel(name = "Modbus寄存器类型")
    private String modbusRegisterType;

    @Excel(name = "Modbus数据类型")
    private String modbusDataType;

    @Excel(name = "Modbus读取顺序")
    private Integer modbusReadOrder;

    @Excel(name = "Modbus分组")
    private String modbusGroup;

    @Excel(name = "小数位数")
    private Integer decimalScale;

    public Long getId() {
        return id;
    }

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

    public String getPointId() {
        return pointId;
    }

    public void setPointId(String pointId) {
        this.pointId = pointId;
    }

    public String getSiteId() {
        return siteId;
    }

    public void setSiteId(String siteId) {
        this.siteId = siteId;
    }

    public String getDeviceCategory() {
        return deviceCategory;
    }

    public void setDeviceCategory(String deviceCategory) {
        this.deviceCategory = deviceCategory;
    }

    public String getDeviceId() {
        return deviceId;
    }

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

    public String getPointName() {
        return pointName;
    }

    public void setPointName(String pointName) {
        this.pointName = pointName;
    }

    public String getDataKey() {
        return dataKey;
    }

    public void setDataKey(String dataKey) {
        this.dataKey = dataKey;
    }

    public String getPointDesc() {
        return pointDesc;
    }

    public void setPointDesc(String pointDesc) {
        this.pointDesc = pointDesc;
    }

    public String getRegisterAddress() {
        return registerAddress;
    }

    public void setRegisterAddress(String registerAddress) {
        this.registerAddress = registerAddress;
    }

    public String getDataUnit() {
        return dataUnit;
    }

    public void setDataUnit(String dataUnit) {
        this.dataUnit = dataUnit;
    }

    public BigDecimal getDataA() {
        return dataA;
    }

    public void setDataA(BigDecimal dataA) {
        this.dataA = dataA;
    }

    public BigDecimal getDataK() {
        return dataK;
    }

    public void setDataK(BigDecimal dataK) {
        this.dataK = dataK;
    }

    public BigDecimal getDataB() {
        return dataB;
    }

    public void setDataB(BigDecimal dataB) {
        this.dataB = dataB;
    }

    public Integer getDataBit() {
        return dataBit;
    }

    public void setDataBit(Integer dataBit) {
        this.dataBit = dataBit;
    }

    public Integer getIsAlarm() {
        return isAlarm;
    }

    public void setIsAlarm(Integer isAlarm) {
        this.isAlarm = isAlarm;
    }

    public String getPointType() {
        return pointType;
    }

    public void setPointType(String pointType) {
        this.pointType = pointType;
    }

    public String getCalcExpression() {
        return calcExpression;
    }

    public void setCalcExpression(String calcExpression) {
        this.calcExpression = calcExpression;
    }

    public Integer getCollectEnabled() {
        return collectEnabled;
    }

    public void setCollectEnabled(Integer collectEnabled) {
        this.collectEnabled = collectEnabled;
    }

    public String getCollectSource() {
        return collectSource;
    }

    public void setCollectSource(String collectSource) {
        this.collectSource = collectSource;
    }

    public String getModbusRegisterType() {
        return modbusRegisterType;
    }

    public void setModbusRegisterType(String modbusRegisterType) {
        this.modbusRegisterType = modbusRegisterType;
    }

    public String getModbusDataType() {
        return modbusDataType;
    }

    public void setModbusDataType(String modbusDataType) {
        this.modbusDataType = modbusDataType;
    }

    public Integer getModbusReadOrder() {
        return modbusReadOrder;
    }

    public void setModbusReadOrder(Integer modbusReadOrder) {
        this.modbusReadOrder = modbusReadOrder;
    }

    public String getModbusGroup() {
        return modbusGroup;
    }

    public void setModbusGroup(String modbusGroup) {
        this.modbusGroup = modbusGroup;
    }

    public Integer getDecimalScale() {
        return decimalScale;
    }

    public void setDecimalScale(Integer decimalScale) {
        this.decimalScale = decimalScale;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("pointId", getPointId())
            .append("siteId", getSiteId())
            .append("deviceCategory", getDeviceCategory())
            .append("deviceId", getDeviceId())
            .append("pointName", getPointName())
            .append("dataKey", getDataKey())
            .append("pointDesc", getPointDesc())
            .append("registerAddress", getRegisterAddress())
            .append("dataUnit", getDataUnit())
            .append("dataA", getDataA())
            .append("dataK", getDataK())
            .append("dataB", getDataB())
            .append("dataBit", getDataBit())
            .append("isAlarm", getIsAlarm())
            .append("pointType", getPointType())
            .append("calcExpression", getCalcExpression())
            .append("collectEnabled", getCollectEnabled())
            .append("collectSource", getCollectSource())
            .append("modbusRegisterType", getModbusRegisterType())
            .append("modbusDataType", getModbusDataType())
            .append("modbusReadOrder", getModbusReadOrder())
            .append("modbusGroup", getModbusGroup())
            .append("decimalScale", getDecimalScale())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
