SysMenu.java 5.9 KB

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