package com.cm.common.pojo.bos;

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

/**
 * @ClassName: RoleBO
 * @Description: 角色
 * @Author: WangGeng
 * @Date: 2019/3/14 9:29 PM
 * @Version: 1.0
 **/
public class RoleBO implements Serializable {

    private static final long serialVersionUID = 3106644672498095887L;
    private String roleId;
    private String roleName;
    private String roleSummary;
    private String roleDataAuthority;
    private List<RoleMenuBO> saveMenu = new ArrayList<>();
    private List<RoleMenuBO> deleteMenu = new ArrayList<>();
    private List<RoleMenuBO> updateMenu = new ArrayList<>();
    private List<RoleMenuBO> queryMenu = new ArrayList<>();
    private List<PermissionBO> permissionInsert = new ArrayList<>();
    private List<PermissionBO> permissionDelete = new ArrayList<>();
    private List<PermissionBO> permissionUpdate = new ArrayList<>();
    private List<PermissionBO> permissionQuery = new ArrayList<>();

    public String getRoleId() {
        return roleId == null ? "" : roleId.trim();
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    public String getRoleName() {
        return roleName == null ? "" : roleName.trim();
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getRoleSummary() {
        return roleSummary == null ? "" : roleSummary.trim();
    }

    public void setRoleSummary(String roleSummary) {
        this.roleSummary = roleSummary;
    }

    public String getRoleDataAuthority() {
        return roleDataAuthority == null ? "" : roleDataAuthority.trim();
    }

    public void setRoleDataAuthority(String roleDataAuthority) {
        this.roleDataAuthority = roleDataAuthority;
    }

    public List<RoleMenuBO> getSaveMenu() {
        return saveMenu == null ? new ArrayList() : saveMenu;
    }

    public void setSaveMenu(List<RoleMenuBO> saveMenu) {
        this.saveMenu = saveMenu;
    }

    public List<RoleMenuBO> getDeleteMenu() {
        return deleteMenu == null ? new ArrayList() : deleteMenu;
    }

    public void setDeleteMenu(List<RoleMenuBO> deleteMenu) {
        this.deleteMenu = deleteMenu;
    }

    public List<RoleMenuBO> getUpdateMenu() {
        return updateMenu == null ? new ArrayList() : updateMenu;
    }

    public void setUpdateMenu(List<RoleMenuBO> updateMenu) {
        this.updateMenu = updateMenu;
    }

    public List<RoleMenuBO> getQueryMenu() {
        return queryMenu == null ? new ArrayList() : queryMenu;
    }

    public void setQueryMenu(List<RoleMenuBO> queryMenu) {
        this.queryMenu = queryMenu;
    }

    public List<PermissionBO> getPermissionInsert() {
        return permissionInsert;
    }

    public void setPermissionInsert(List<PermissionBO> permissionInsert) {
        this.permissionInsert = permissionInsert;
    }

    public List<PermissionBO> getPermissionDelete() {
        return permissionDelete;
    }

    public void setPermissionDelete(List<PermissionBO> permissionDelete) {
        this.permissionDelete = permissionDelete;
    }

    public List<PermissionBO> getPermissionUpdate() {
        return permissionUpdate;
    }

    public void setPermissionUpdate(List<PermissionBO> permissionUpdate) {
        this.permissionUpdate = permissionUpdate;
    }

    public List<PermissionBO> getPermissionQuery() {
        return permissionQuery;
    }

    public void setPermissionQuery(List<PermissionBO> permissionQuery) {
        this.permissionQuery = permissionQuery;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"roleId\":\"")
                .append(roleId).append('\"');
        sb.append(",\"roleName\":\"")
                .append(roleName).append('\"');
        sb.append(",\"roleSummary\":\"")
                .append(roleSummary).append('\"');
        sb.append(",\"roleDataAuthority\":\"")
                .append(roleDataAuthority).append('\"');
        sb.append(",\"saveMenu\":")
                .append(saveMenu);
        sb.append(",\"deleteMenu\":")
                .append(deleteMenu);
        sb.append(",\"updateMenu\":")
                .append(updateMenu);
        sb.append(",\"queryMenu\":")
                .append(queryMenu);
        sb.append(",\"permissionInsert\":")
                .append(permissionInsert);
        sb.append(",\"permissionDelete\":")
                .append(permissionDelete);
        sb.append(",\"permissionUpdate\":")
                .append(permissionUpdate);
        sb.append(",\"permissionQuery\":")
                .append(permissionQuery);
        sb.append('}');
        return sb.toString();
    }
}
