package ink.wgink.pojo.dtos.menu;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @ClassName: MenuDTO
 * @Description: 菜单
 * @Author: wenc
 * @Date: 2018/12/27 10:32 PM
 * @Version: 1.0
 **/
@ApiModel
public class MenuDTO implements Serializable {

    private static final long serialVersionUID = 3760239870408414901L;
    @ApiModelProperty(name = "menuId", value = "菜单ID")
    private String menuId;
    @ApiModelProperty(name = "menuParentId", value = "父级菜单ID")
    private String menuParentId;
    @ApiModelProperty(name = "menuParentName", value = "父级菜单名称")
    private String menuParentName;
    @ApiModelProperty(name = "isParent", value = "是否父节点")
    private Boolean isParent;
    @ApiModelProperty(name = "menuName", value = "菜单名称")
    private String menuName;
    @ApiModelProperty(name = "menuSummary", value = "菜单说明")
    private String menuSummary;
    @ApiModelProperty(name = "menuCode", value = "菜单编码")
    private String menuCode;
    @ApiModelProperty(name = "menuUrl", value = "菜单链接")
    private String menuUrl;
    @ApiModelProperty(name = "menuIcon", value = "菜单图标")
    private String menuIcon;
    @ApiModelProperty(name = "menuType", value = "菜单类型")
    private Integer menuType;
    @ApiModelProperty(name = "menuOrder", value = "菜单排序")
    private Integer menuOrder;
    @ApiModelProperty(name = "menuStatus", value = "菜 单状态")
    private Integer menuStatus;
    @ApiModelProperty(name = "openType", value = "打开方式")
    private Integer openType;
    @ApiModelProperty(name = "isRight", value = "是否有权限")
    private Boolean isRight;
    @ApiModelProperty(name = "subMenus", value = "子菜单")
    private List<MenuDTO> subMenus;

    public String getMenuId() {
        return menuId == null ? "" : menuId.trim();
    }

    public void setMenuId(String menuId) {
        this.menuId = menuId;
    }

    public String getMenuParentId() {
        return menuParentId == null ? "" : menuParentId.trim();
    }

    public void setMenuParentId(String menuParentId) {
        this.menuParentId = menuParentId;
    }

    public String getMenuParentName() {
        return menuParentName == null ? "" : menuParentName.trim();
    }

    public void setMenuParentName(String menuParentName) {
        this.menuParentName = menuParentName;
    }

    public Boolean getParent() {
        return isParent;
    }

    public void setParent(Boolean parent) {
        isParent = parent;
    }

    public String getMenuName() {
        return menuName == null ? "" : menuName.trim();
    }

    public void setMenuName(String menuName) {
        this.menuName = menuName;
    }

    public String getMenuCode() {
        return menuCode == null ? "" : menuCode.trim();
    }

    public void setMenuCode(String menuCode) {
        this.menuCode = menuCode;
    }

    public String getMenuSummary() {
        return menuSummary == null ? "" : menuSummary;
    }

    public void setMenuSummary(String menuSummary) {
        this.menuSummary = menuSummary;
    }

    public String getMenuUrl() {
        return menuUrl == null ? "" : menuUrl.trim();
    }

    public void setMenuUrl(String menuUrl) {
        this.menuUrl = menuUrl;
    }

    public String getMenuIcon() {
        return menuIcon == null ? "" : menuIcon.trim();
    }

    public void setMenuIcon(String menuIcon) {
        this.menuIcon = menuIcon;
    }

    public Integer getMenuType() {
        return menuType;
    }

    public void setMenuType(Integer menuType) {
        this.menuType = menuType;
    }

    public Integer getMenuOrder() {
        return menuOrder;
    }

    public void setMenuOrder(Integer menuOrder) {
        this.menuOrder = menuOrder;
    }

    public Integer getMenuStatus() {
        return menuStatus;
    }

    public void setMenuStatus(Integer menuStatus) {
        this.menuStatus = menuStatus;
    }

    public Integer getOpenType() {
        return openType;
    }

    public void setOpenType(Integer openType) {
        this.openType = openType;
    }

    public Boolean getRight() {
        return isRight;
    }

    public void setRight(Boolean right) {
        isRight = right;
    }

    public List<MenuDTO> getSubMenus() {
        return subMenus == null ? new ArrayList<>() : subMenus;
    }

    public void setSubMenus(List<MenuDTO> subMenus) {
        this.subMenus = subMenus;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"menuId\":\"")
                .append(menuId).append('\"');
        sb.append(",\"menuParentId\":\"")
                .append(menuParentId).append('\"');
        sb.append(",\"menuParentName\":\"")
                .append(menuParentName).append('\"');
        sb.append(",\"isParent\":")
                .append(isParent);
        sb.append(",\"menuName\":\"")
                .append(menuName).append('\"');
        sb.append(",\"menuSummary\":\"")
                .append(menuSummary).append('\"');
        sb.append(",\"menuCode\":\"")
                .append(menuCode).append('\"');
        sb.append(",\"menuUrl\":\"")
                .append(menuUrl).append('\"');
        sb.append(",\"menuIcon\":\"")
                .append(menuIcon).append('\"');
        sb.append(",\"menuType\":")
                .append(menuType);
        sb.append(",\"menuOrder\":")
                .append(menuOrder);
        sb.append(",\"menuStatus\":")
                .append(menuStatus);
        sb.append(",\"openType\":")
                .append(openType);
        sb.append(",\"isRight\":")
                .append(isRight);
        sb.append(",\"subMenus\":")
                .append(subMenus);
        sb.append('}');
        return sb.toString();
    }
}
