package com.mvc.model.router;

import com.mvc.entity.TDynamicrouteMeta;

public class TDynamicrouteMetaModel {
    public TDynamicrouteMetaModel(TDynamicrouteMeta entity) {
        icon = entity.getIcon();
        title = entity.getTitle();
        //isLink = String.valueOf(entity.getIslink().equals("1"));
        isLink = "";
        isHide = entity.getIshide() != null && entity.getIshide() == 1;
        isFull = entity.getIsfull() != null && entity.getIsfull() == 1;
        isAffix = entity.getIsaffix() != null && entity.getIsaffix() == 1;
        isKeepAlive = entity.getIskeepalive() != null && entity.getIskeepalive() == 1;
        isCxac = entity.getIscxac() != null && entity.getIscxac() == 1;
        routerId = entity.getRouterId();
        allowUnitTypes = entity.getAllowUnitTypes();

        /*isHide = String.valueOf(entity.getIshide()!=null&&entity.getIshide()==1);
        isFull = String.valueOf(entity.getIsfull()!=null&&entity.getIsfull()==1);
        isAffix = String.valueOf(entity.getIsaffix()!=null&&entity.getIsaffix()==1);
        isKeepAlive = String.valueOf(entity.getIskeepalive()!=null&&entity.getIskeepalive()==1);
        isCxac = String.valueOf(entity.getIscxac()!=null&&entity.getIscxac()==1);*/
    }

    private String icon;

    private String title;

    private String isLink;

    private Boolean isHide;

    private Boolean isFull;

    private Boolean isAffix;

    private Boolean isKeepAlive;

    private Boolean isCxac;

    private Integer routerId;

    private String allowUnitTypes;

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon == null ? null : icon.trim();
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title == null ? null : title.trim();
    }

    public String getIsLink() {
        return isLink;
    }

    public void setIsLink(String isLink) {
        this.isLink = isLink;
    }

    public Boolean getIsHide() {
        return isHide;
    }

    public void setIsHide(Boolean isHide) {
        this.isHide = isHide;
    }

    public Boolean getIsFull() {
        return isFull;
    }

    public void setIsFull(Boolean isFull) {
        this.isFull = isFull;
    }

    public Boolean getIsAffix() {
        return isAffix;
    }

    public void setIsAffix(Boolean isAffix) {
        this.isAffix = isAffix;
    }

    public Boolean getIsKeepAlive() {
        return isKeepAlive;
    }

    public void setIsKeepAlive(Boolean isKeepAlive) {
        this.isKeepAlive = isKeepAlive;
    }

    public Boolean getIsCxac() {
        return isCxac;
    }

    public void setIsCxac(Boolean isCxac) {
        this.isCxac = isCxac;
    }

    public Integer getRouterId() {
        return routerId;
    }

    public void setRouterId(Integer routerId) {
        this.routerId = routerId;
    }

    public String getAllowUnitTypes() {
        return allowUnitTypes;
    }

    public void setAllowUnitTypes(String allowUnitTypes) {
        this.allowUnitTypes = allowUnitTypes == null ? null : allowUnitTypes.trim();
    }
}