package com.casic.PgInterface.patroler.dto;

import com.casic.PgInterface.patroler.domain.PgAlarmRule;

/**
 * Created by yxw on 2017/12/14.
 */
public class PgAlarmRuleDto{

    private Long id;
    private String highValue;//高限
    private String lowValue;//低限
    private String devType;//设备类型
    private String unit;//单位
    private String alarmType;//报警类型

    public Long getId() {
        return id;
    }

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

    public String getHighValue() {
        return highValue;
    }

    public void setHighValue(String highValue) {
        this.highValue = highValue;
    }

    public String getLowValue() {
        return lowValue;
    }

    public void setLowValue(String lowValue) {
        this.lowValue = lowValue;
    }

    public String getDevType() {
        return devType;
    }

    public void setDevType(String devType) {
        this.devType = devType;
    }

    public String getUnit() {
        return unit;
    }

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

    public String getAlarmType() {
        return alarmType;
    }

    public void setAlarmType(String alarmType) {
        this.alarmType = alarmType;
    }

    public PgAlarmRuleDto(PgAlarmRule pgAlarmRule) {
        this.setId(pgAlarmRule.getId());
        this.setHighValue(pgAlarmRule.getHighValue());
        this.setLowValue(pgAlarmRule.getLowValue());
        this.setDevType(pgAlarmRule.getDevType());
        this.setUnit(pgAlarmRule.getUnit());
        if (pgAlarmRule.getAlarmTypeId() == null)
            this.setAlarmType("");
        else
            this.setAlarmType(pgAlarmRule.getAlarmTypeId().getAlarmType());
    }

}