yijiusmile
2021-04-20 096f6025e0212b23df8485b56818c3f0b019aa26
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
package cc.mrbird.febs.common.core.entity.router;
 
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
 
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
 
/**
 * 构建 Vue路由
 *
 * @author MrBird
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class VueRouter<T> implements Serializable {
 
    private static final long serialVersionUID = -3327478146308500708L;
 
    @JsonIgnore
    private String id;
    @JsonIgnore
    private String parentId;
 
    private String path;
    private String name;
    private String component;
    private String redirect;
    private RouterMeta meta;
    private Boolean hidden = false;
    private Boolean alwaysShow = false;
    private List<VueRouter<T>> children;
 
    @JsonIgnore
    private Boolean hasParent = false;
 
    @JsonIgnore
    private Boolean hasChildren = false;
 
    public void initChildren() {
        this.children = new ArrayList<>();
    }
 
}