package ink.wgink.pojo.dtos.role;

import ink.wgink.pojo.dtos.permission.PermissionDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

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

/**
 * @ClassName: PermissionDTO
 * @Description: 权限
 * @Author: WenG
 * @Date: 2020-05-27 15:58
 * @Version: 1.0
 **/
@ApiModel
public class RolePermissionDTO implements Serializable {

    private static final long serialVersionUID = 2694431497469393859L;
    @ApiModelProperty(name = "roleId", value = "角色ID")
    private String roleId;
    @ApiModelProperty(name = "apiTag", value = "系统标识")
    private String apiTag;
    @ApiModelProperty(name = "permissionId", value = "权限ID")
    private String permissionId;
    @ApiModelProperty(name = "permissionType", value = "权限类型")
    private String permissionType;

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

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

    public String getApiTag() {
        return apiTag == null ? "" : apiTag.trim();
    }

    public void setApiTag(String apiTag) {
        this.apiTag = apiTag;
    }

    public String getPermissionId() {
        return permissionId == null ? "" : permissionId.trim();
    }

    public void setPermissionId(String permissionId) {
        this.permissionId = permissionId;
    }

    public String getPermissionType() {
        return permissionType == null ? "" : permissionType.trim();
    }

    public void setPermissionType(String permissionType) {
        this.permissionType = permissionType;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"roleId\":\"")
                .append(roleId).append('\"');
        sb.append(",\"apiTag\":\"")
                .append(apiTag).append('\"');
        sb.append(",\"permissionId\":\"")
                .append(permissionId).append('\"');
        sb.append(",\"permissionType\":\"")
                .append(permissionType).append('\"');
        sb.append('}');
        return sb.toString();
    }
}
