diff --git a/wj/src/main/java/com/gm/wj/pojo/Menu.java b/wj/src/main/java/com/gm/wj/pojo/Menu.java new file mode 100644 index 0000000000000000000000000000000000000000..5bc64f8ad7431611331d04f9e9289d1e282a5801 --- /dev/null +++ b/wj/src/main/java/com/gm/wj/pojo/Menu.java @@ -0,0 +1,78 @@ +package com.gm.wj.pojo; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +import javax.persistence.*; +import java.util.List; + +@Entity +@Table(name = "menu") +@JsonIgnoreProperties({"handler","hibernateLazyInitializer"}) +public class Menu { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "id") + Long id; + String path; + String icon; + String component; + MenuMeta meta; + Long parentId; + List children; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } + + public String getIcon() { + return icon; + } + + public void setIcon(String icon) { + this.icon = icon; + } + + public String getComponent() { + return component; + } + + public void setComponent(String component) { + this.component = component; + } + + public MenuMeta getMeta() { + return meta; + } + + public void setMeta(MenuMeta meta) { + this.meta = meta; + } + + public Long getParentId() { + return parentId; + } + + public void setParentId(Long parentId) { + this.parentId = parentId; + } + + public List getChildren() { + return children; + } + + public void setChildren(List children) { + this.children = children; + } +} diff --git a/wj/src/main/java/com/gm/wj/pojo/MenuMeta.java b/wj/src/main/java/com/gm/wj/pojo/MenuMeta.java new file mode 100644 index 0000000000000000000000000000000000000000..140ce19949fd0df4145bc7deb5c96bb7804a10af --- /dev/null +++ b/wj/src/main/java/com/gm/wj/pojo/MenuMeta.java @@ -0,0 +1,13 @@ +package com.gm.wj.pojo; + +public class MenuMeta { + private boolean requireAuth; + + public boolean isRequireAuth() { + return requireAuth; + } + + public void setRequireAuth(boolean requireAuth) { + this.requireAuth = requireAuth; + } +}