package ink.wgink.service.role.pojo.vos;

import ink.wgink.annotation.CheckEmptyAnnotation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * @ClassName: RoleVO
 * @Description: 角色视图
 * @Author: WangGeng
 * @Date: 2019/3/1 11:35 PM
 * @Version: 1.0
 **/
@ApiModel
public class RoleVO {

    @ApiModelProperty(name = "roleParentId", value = "上级ID", required = true)
    @CheckEmptyAnnotation(name = "上级ID不能为空")
    private String roleParentId;
    @ApiModelProperty(name = "roleName", value = "角色名称", required = true, example = "角色名称")
    @CheckEmptyAnnotation(name = "角色名称不能为空")
    private String roleName;
    @ApiModelProperty(name = "roleSummary", value = "角色说明", example = "这是说明")
    private String roleSummary;

    public String getRoleParentId() {
        return roleParentId == null ? null : roleParentId.trim();
    }

    public void setRoleParentId(String roleParentId) {
        this.roleParentId = roleParentId;
    }

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

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

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

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

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"roleParentId\":")
                .append("\"").append(roleParentId).append("\"");
        sb.append(",\"roleName\":")
                .append("\"").append(roleName).append("\"");
        sb.append(",\"roleSummary\":")
                .append("\"").append(roleSummary).append("\"");
        sb.append('}');
        return sb.toString();
    }
}
