提交 | 用户 | 时间
|
e57a89
|
1 |
package com.jcdm.common.core.domain.entity; |
懒 |
2 |
|
|
3 |
import java.util.ArrayList; |
|
4 |
import java.util.List; |
|
5 |
import javax.validation.constraints.NotBlank; |
|
6 |
import javax.validation.constraints.NotNull; |
|
7 |
import javax.validation.constraints.Size; |
|
8 |
import org.apache.commons.lang3.builder.ToStringBuilder; |
|
9 |
import org.apache.commons.lang3.builder.ToStringStyle; |
|
10 |
import com.jcdm.common.core.domain.BaseEntity; |
|
11 |
|
|
12 |
/** |
|
13 |
* 菜单权限表 sys_menu |
|
14 |
* |
|
15 |
* @author jc |
|
16 |
*/ |
|
17 |
public class SysMenu extends BaseEntity |
|
18 |
{ |
|
19 |
private static final long serialVersionUID = 1L; |
|
20 |
|
|
21 |
/** 菜单ID */ |
|
22 |
private Long menuId; |
|
23 |
|
|
24 |
/** 菜单名称 */ |
|
25 |
private String menuName; |
|
26 |
|
|
27 |
/** 父菜单名称 */ |
|
28 |
private String parentName; |
|
29 |
|
|
30 |
/** 父菜单ID */ |
|
31 |
private Long parentId; |
|
32 |
|
|
33 |
/** 显示顺序 */ |
|
34 |
private Integer orderNum; |
|
35 |
|
|
36 |
/** 路由地址 */ |
|
37 |
private String path; |
|
38 |
|
|
39 |
/** 组件路径 */ |
|
40 |
private String component; |
|
41 |
|
|
42 |
/** 路由参数 */ |
|
43 |
private String query; |
|
44 |
|
|
45 |
/** 是否为外链(0是 1否) */ |
|
46 |
private String isFrame; |
|
47 |
|
|
48 |
/** 是否缓存(0缓存 1不缓存) */ |
|
49 |
private String isCache; |
|
50 |
|
|
51 |
/** 类型(M目录 C菜单 F按钮) */ |
|
52 |
private String menuType; |
|
53 |
|
|
54 |
/** 显示状态(0显示 1隐藏) */ |
|
55 |
private String visible; |
|
56 |
|
|
57 |
/** 菜单状态(0正常 1停用) */ |
|
58 |
private String status; |
|
59 |
|
|
60 |
/** 权限字符串 */ |
|
61 |
private String perms; |
|
62 |
|
|
63 |
/** 菜单图标 */ |
|
64 |
private String icon; |
|
65 |
|
|
66 |
/** 子菜单 */ |
|
67 |
private List<SysMenu> children = new ArrayList<SysMenu>(); |
|
68 |
|
|
69 |
public Long getMenuId() |
|
70 |
{ |
|
71 |
return menuId; |
|
72 |
} |
|
73 |
|
|
74 |
public void setMenuId(Long menuId) |
|
75 |
{ |
|
76 |
this.menuId = menuId; |
|
77 |
} |
|
78 |
|
|
79 |
@NotBlank(message = "菜单名称不能为空") |
|
80 |
@Size(min = 0, max = 50, message = "菜单名称长度不能超过50个字符") |
|
81 |
public String getMenuName() |
|
82 |
{ |
|
83 |
return menuName; |
|
84 |
} |
|
85 |
|
|
86 |
public void setMenuName(String menuName) |
|
87 |
{ |
|
88 |
this.menuName = menuName; |
|
89 |
} |
|
90 |
|
|
91 |
public String getParentName() |
|
92 |
{ |
|
93 |
return parentName; |
|
94 |
} |
|
95 |
|
|
96 |
public void setParentName(String parentName) |
|
97 |
{ |
|
98 |
this.parentName = parentName; |
|
99 |
} |
|
100 |
|
|
101 |
public Long getParentId() |
|
102 |
{ |
|
103 |
return parentId; |
|
104 |
} |
|
105 |
|
|
106 |
public void setParentId(Long parentId) |
|
107 |
{ |
|
108 |
this.parentId = parentId; |
|
109 |
} |
|
110 |
|
|
111 |
@NotNull(message = "显示顺序不能为空") |
|
112 |
public Integer getOrderNum() |
|
113 |
{ |
|
114 |
return orderNum; |
|
115 |
} |
|
116 |
|
|
117 |
public void setOrderNum(Integer orderNum) |
|
118 |
{ |
|
119 |
this.orderNum = orderNum; |
|
120 |
} |
|
121 |
|
|
122 |
@Size(min = 0, max = 200, message = "路由地址不能超过200个字符") |
|
123 |
public String getPath() |
|
124 |
{ |
|
125 |
return path; |
|
126 |
} |
|
127 |
|
|
128 |
public void setPath(String path) |
|
129 |
{ |
|
130 |
this.path = path; |
|
131 |
} |
|
132 |
|
|
133 |
@Size(min = 0, max = 200, message = "组件路径不能超过255个字符") |
|
134 |
public String getComponent() |
|
135 |
{ |
|
136 |
return component; |
|
137 |
} |
|
138 |
|
|
139 |
public void setComponent(String component) |
|
140 |
{ |
|
141 |
this.component = component; |
|
142 |
} |
|
143 |
|
|
144 |
public String getQuery() |
|
145 |
{ |
|
146 |
return query; |
|
147 |
} |
|
148 |
|
|
149 |
public void setQuery(String query) |
|
150 |
{ |
|
151 |
this.query = query; |
|
152 |
} |
|
153 |
|
|
154 |
public String getIsFrame() |
|
155 |
{ |
|
156 |
return isFrame; |
|
157 |
} |
|
158 |
|
|
159 |
public void setIsFrame(String isFrame) |
|
160 |
{ |
|
161 |
this.isFrame = isFrame; |
|
162 |
} |
|
163 |
|
|
164 |
public String getIsCache() |
|
165 |
{ |
|
166 |
return isCache; |
|
167 |
} |
|
168 |
|
|
169 |
public void setIsCache(String isCache) |
|
170 |
{ |
|
171 |
this.isCache = isCache; |
|
172 |
} |
|
173 |
|
|
174 |
@NotBlank(message = "菜单类型不能为空") |
|
175 |
public String getMenuType() |
|
176 |
{ |
|
177 |
return menuType; |
|
178 |
} |
|
179 |
|
|
180 |
public void setMenuType(String menuType) |
|
181 |
{ |
|
182 |
this.menuType = menuType; |
|
183 |
} |
|
184 |
|
|
185 |
public String getVisible() |
|
186 |
{ |
|
187 |
return visible; |
|
188 |
} |
|
189 |
|
|
190 |
public void setVisible(String visible) |
|
191 |
{ |
|
192 |
this.visible = visible; |
|
193 |
} |
|
194 |
|
|
195 |
public String getStatus() |
|
196 |
{ |
|
197 |
return status; |
|
198 |
} |
|
199 |
|
|
200 |
public void setStatus(String status) |
|
201 |
{ |
|
202 |
this.status = status; |
|
203 |
} |
|
204 |
|
|
205 |
@Size(min = 0, max = 100, message = "权限标识长度不能超过100个字符") |
|
206 |
public String getPerms() |
|
207 |
{ |
|
208 |
return perms; |
|
209 |
} |
|
210 |
|
|
211 |
public void setPerms(String perms) |
|
212 |
{ |
|
213 |
this.perms = perms; |
|
214 |
} |
|
215 |
|
|
216 |
public String getIcon() |
|
217 |
{ |
|
218 |
return icon; |
|
219 |
} |
|
220 |
|
|
221 |
public void setIcon(String icon) |
|
222 |
{ |
|
223 |
this.icon = icon; |
|
224 |
} |
|
225 |
|
|
226 |
public List<SysMenu> getChildren() |
|
227 |
{ |
|
228 |
return children; |
|
229 |
} |
|
230 |
|
|
231 |
public void setChildren(List<SysMenu> children) |
|
232 |
{ |
|
233 |
this.children = children; |
|
234 |
} |
|
235 |
|
|
236 |
@Override |
|
237 |
public String toString() { |
|
238 |
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
|
239 |
.append("menuId", getMenuId()) |
|
240 |
.append("menuName", getMenuName()) |
|
241 |
.append("parentId", getParentId()) |
|
242 |
.append("orderNum", getOrderNum()) |
|
243 |
.append("path", getPath()) |
|
244 |
.append("component", getComponent()) |
|
245 |
.append("isFrame", getIsFrame()) |
|
246 |
.append("IsCache", getIsCache()) |
|
247 |
.append("menuType", getMenuType()) |
|
248 |
.append("visible", getVisible()) |
|
249 |
.append("status ", getStatus()) |
|
250 |
.append("perms", getPerms()) |
|
251 |
.append("icon", getIcon()) |
|
252 |
.append("createBy", getCreateBy()) |
|
253 |
.append("createTime", getCreateTime()) |
|
254 |
.append("updateBy", getUpdateBy()) |
|
255 |
.append("updateTime", getUpdateTime()) |
|
256 |
.append("remark", getRemark()) |
|
257 |
.toString(); |
|
258 |
} |
|
259 |
} |