init
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
package com.ruoyi.xq.dto.app.areacode;
|
||||
|
||||
import com.ruoyi.xq.domain.AreaCode;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class AreaCodeTree extends AreaCode {
|
||||
|
||||
private Integer code;
|
||||
/**
|
||||
* 名字
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* country:国家、province:省份(直辖市会在province和city显示)、city:市(直辖市会在province和city显示)、district:区县
|
||||
*/
|
||||
private String level;
|
||||
/**
|
||||
* 所属上级行政区划代码
|
||||
*/
|
||||
private Integer pcode;
|
||||
/**
|
||||
* 所属行政区划名字
|
||||
*/
|
||||
private String pname;
|
||||
|
||||
private List<AreaCode> childrenArea;
|
||||
public void addChild(AreaCodeTree child) {
|
||||
if (childrenArea == null) {
|
||||
childrenArea = new ArrayList<>();
|
||||
}
|
||||
childrenArea.add(child);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user