RuoYi
2019-10-11 e235d5aa57314fbad9d30a77bab14bf917edb133
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
package com.ruoyi.project.system.domain;
 
import com.ruoyi.framework.web.domain.BaseEntity;
 
/**
 * 角色表 sys_role
 * 
 * @author ruoyi
 */
public class SysRole extends BaseEntity
{
    private static final long serialVersionUID = 1L;
 
    /** 角色ID */
    private Long roleId;
 
    /** 角色名称 */
    private String roleName;
 
    /** 角色权限 */
    private String roleKey;
 
    /** 角色排序 */
    private String roleSort;
 
    /** 数据范围 */
    private String dataScope;
 
    /** 角色状态(0正常 1停用) */
    private String status;
 
    /** 删除标志(0代表存在 2代表删除) */
    private String delFlag;
 
    /** 用户是否存在此角色标识 默认不存在 */
    private boolean flag = false;
 
    /** 菜单组 */
    private Long[] menuIds;
 
    /** 部门组(数据权限) */
    private Long[] deptIds;
 
    public SysRole()
    {
 
    }
 
    public SysRole(Long roleId)
    {
        this.roleId = roleId;
    }
 
    public Long getRoleId()
    {
        return roleId;
    }
 
    public void setRoleId(Long roleId)
    {
        this.roleId = roleId;
    }
 
    public boolean isAdmin()
    {
        return isAdmin(this.roleId);
    }
 
    public static boolean isAdmin(Long roleId)
    {
        return roleId != null && 1L == roleId;
    }
 
    public String getRoleName()
    {
        return roleName;
    }
 
    public void setRoleName(String roleName)
    {
        this.roleName = roleName;
    }
 
    public String getRoleKey()
    {
        return roleKey;
    }
 
    public void setRoleKey(String roleKey)
    {
        this.roleKey = roleKey;
    }
 
    public String getRoleSort()
    {
        return roleSort;
    }
 
    public void setRoleSort(String roleSort)
    {
        this.roleSort = roleSort;
    }
 
    public String getDataScope()
    {
        return dataScope;
    }
 
    public void setDataScope(String dataScope)
    {
        this.dataScope = dataScope;
    }
 
    public String getStatus()
    {
        return status;
    }
 
    public void setStatus(String status)
    {
        this.status = status;
    }
 
    public String getDelFlag()
    {
        return delFlag;
    }
 
    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }
 
    public boolean isFlag()
    {
        return flag;
    }
 
    public void setFlag(boolean flag)
    {
        this.flag = flag;
    }
 
    public Long[] getMenuIds()
    {
        return menuIds;
    }
 
    public void setMenuIds(Long[] menuIds)
    {
        this.menuIds = menuIds;
    }
 
    public Long[] getDeptIds()
    {
        return deptIds;
    }
 
    public void setDeptIds(Long[] deptIds)
    {
        this.deptIds = deptIds;
    }
}