package com.casic.PgInterface.reservePlan.dto;

import com.casic.PgInterface.reservePlan.domain.PgReservePlan;

/**
 * Created by yxw on 2017/11/2.
 */
public class PgReservePlanDto{

    private String id;
    private String planName;//预案名称
    private String planType;//预案类型
    private String alarmType;//报警类型
    private String resUnit;//责任单位
    private String planFile;//预案文档
    private String active;//状态位

    public String getId() {
        return id;
    }

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

    public String getPlanName() {
        return planName;
    }

    public void setPlanName(String planName) {
        this.planName = planName;
    }

    public String getPlanType() {
        return planType;
    }

    public void setPlanType(String planType) {
        this.planType = planType;
    }

    public String getAlarmType() {
        return alarmType;
    }

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

    public String getResUnit() {
        return resUnit;
    }

    public void setResUnit(String resUnit) {
        this.resUnit = resUnit;
    }

    public String getPlanFile() {
        return planFile;
    }

    public void setPlanFile(String planFile) {
        this.planFile = planFile;
    }

    public String getActive() {
        return active;
    }

    public void setActive(String active) {
        this.active = active;
    }

    public PgReservePlanDto(PgReservePlan pgReservePlan) {
        this.setPlanName(pgReservePlan.getPlanName());
        this.setPlanType(pgReservePlan.getPlanType());
        if (pgReservePlan.getPgAlarmTypeId() == null)
            this.setAlarmType("");
        else
            this.setAlarmType(pgReservePlan.getPgAlarmTypeId().getAlarmType());
        this.setResUnit(pgReservePlan.getResUnit());
        this.setPlanFile(pgReservePlan.getPlanFile());
        this.setActive(String.valueOf(pgReservePlan.getActive()));
    }

}
