提交 | 用户 | 时间
|
e7c126
|
1 |
package com.iailab.framework.ip.core; |
H |
2 |
|
|
3 |
import com.iailab.framework.ip.core.enums.AreaTypeEnum; |
|
4 |
import lombok.AllArgsConstructor; |
|
5 |
import lombok.Data; |
|
6 |
import lombok.NoArgsConstructor; |
|
7 |
|
|
8 |
import java.util.List; |
|
9 |
|
|
10 |
/** |
|
11 |
* 区域节点,包括国家、省份、城市、地区等信息 |
|
12 |
* |
|
13 |
* 数据可见 resources/area.csv 文件 |
|
14 |
* |
|
15 |
* @author iailab |
|
16 |
*/ |
|
17 |
@Data |
|
18 |
@AllArgsConstructor |
|
19 |
@NoArgsConstructor |
|
20 |
public class Area { |
|
21 |
|
|
22 |
/** |
|
23 |
* 编号 - 全球,即根目录 |
|
24 |
*/ |
|
25 |
public static final Integer ID_GLOBAL = 0; |
|
26 |
/** |
|
27 |
* 编号 - 中国 |
|
28 |
*/ |
|
29 |
public static final Integer ID_CHINA = 1; |
|
30 |
|
|
31 |
/** |
|
32 |
* 编号 |
|
33 |
*/ |
|
34 |
private Integer id; |
|
35 |
/** |
|
36 |
* 名字 |
|
37 |
*/ |
|
38 |
private String name; |
|
39 |
/** |
|
40 |
* 类型 |
|
41 |
* |
|
42 |
* 枚举 {@link AreaTypeEnum} |
|
43 |
*/ |
|
44 |
private Integer type; |
|
45 |
|
|
46 |
/** |
|
47 |
* 父节点 |
|
48 |
*/ |
|
49 |
private Area parent; |
|
50 |
/** |
|
51 |
* 子节点 |
|
52 |
*/ |
|
53 |
private List<Area> children; |
|
54 |
|
|
55 |
} |