ROLE.java 1.8 KB
package com.tianbo.warehouse.model;

import org.springframework.security.core.GrantedAuthority;

import java.util.List;

public class ROLE implements GrantedAuthority {

    private static final long serialVersionUID = 1L;

    private Integer roleId;

    private String roleName;

    private String roleSign;

    private String description;

    private String departmentId;

    private String departmentName;

    private List<PERMISSION> permissions;

    public String getDepartmentName() {
        return departmentName;
    }

    public void setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
    }

    public Integer getRoleId() {
        return roleId;
    }

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

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName == null ? null : roleName.trim();
    }

    public String getRoleSign() {
        return roleSign;
    }

    public void setRoleSign(String roleSign) {
        this.roleSign = roleSign == null ? null : roleSign.trim();
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description == null ? null : description.trim();
    }

    public String getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(String departmentId) {
        this.departmentId = departmentId == null ? null : departmentId.trim();
    }

    public List<PERMISSION> getPermissions() {
        return permissions;
    }

    public void setPermissions(List<PERMISSION> permissions) {
        this.permissions = permissions;
    }

    @Override
    public String getAuthority(){
        return this.getRoleName();
    }
}