package com.cm.common.plugin.pojo.dtos.dataarea;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: DictionaryDTO
 * @Description: 地区
 * @Author: WangGeng
 * @Date: 2019/11/18 14:17
 * @Version: 1.0
 **/
@ApiModel
public class DataAreaDTO implements Serializable {

    private static final long serialVersionUID = 230115030021213880L;
    @ApiModelProperty(name = "areaId", value = "地区ID")
    private String areaId;
    @ApiModelProperty(name = "areaParentId", value = "地区上级ID")
    private String areaParentId;
    @ApiModelProperty(name = "areaParentName", value = "地区上级名称")
    private String areaParentName;
    @ApiModelProperty(name = "areaName", value = "地区名称")
    private String areaName;
    @ApiModelProperty(name = "areaCode", value = "地区地区编码")
    private String areaCode;
    @ApiModelProperty(name = "areaCityCode", value = "地区城市编码")
    private String areaCityCode;
    @ApiModelProperty(name = "areaMergerName", value = "地区合并名称")
    private String areaMergerName;
    @ApiModelProperty(name = "areaShortName", value = "地区简称")
    private String areaShortName;
    @ApiModelProperty(name = "areaZipCode", value = "地区邮政编码")
    private String areaZipCode;
    @ApiModelProperty(name = "areaLevel", value = "地区级别（0: 省级 1:市级 2:县级 3:镇级 4:乡村级）")
    private String areaLevel;
    @ApiModelProperty(name = "areaLng", value = "地区经度")
    private String areaLng;
    @ApiModelProperty(name = "areaLat", value = "地区纬度")
    private String areaLat;
    @ApiModelProperty(name = "areaPinyin", value = "地区拼音")
    private String areaPinyin;
    @ApiModelProperty(name = "areaFirst", value = "地区首字母")
    private String areaFirst;
    @ApiModelProperty(name = "isParent", value = "是否父级")
    private Boolean isParent;
    @ApiModelProperty(name = "subArea", value = "子地区列表")
    private List<DataAreaDTO> subArea;

    public String getAreaId() {
        return areaId == null ? "" : areaId;
    }

    public void setAreaId(String areaId) {
        this.areaId = areaId;
    }

    public String getAreaParentId() {
        return areaParentId == null ? "" : areaParentId;
    }

    public void setAreaParentId(String areaParentId) {
        this.areaParentId = areaParentId;
    }

    public String getAreaParentName() {
        return areaParentName == null ? "" : areaParentName;
    }

    public void setAreaParentName(String areaParentName) {
        this.areaParentName = areaParentName;
    }

    public String getAreaName() {
        return areaName == null ? "" : areaName;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    public String getAreaCode() {
        return areaCode;
    }

    public void setAreaCode(String areaCode) {
        this.areaCode = areaCode;
    }

    public String getAreaCityCode() {
        return areaCityCode == null ? "" : areaCityCode;
    }

    public void setAreaCityCode(String areaCityCode) {
        this.areaCityCode = areaCityCode;
    }

    public String getAreaMergerName() {
        return areaMergerName == null ? "" : areaMergerName;
    }

    public void setAreaMergerMame(String areaMergerMame) {
        this.areaMergerName = areaMergerMame;
    }

    public String getAreaShortName() {
        return areaShortName == null ? "" : areaShortName;
    }

    public void setAreaShortName(String areaShortName) {
        this.areaShortName = areaShortName;
    }

    public String getAreaZipCode() {
        return areaZipCode == null ? "" : areaZipCode;
    }

    public void setAreaZipCode(String areaZipCode) {
        this.areaZipCode = areaZipCode;
    }

    public String getAreaLevel() {
        return areaLevel == null ? "" : areaLevel;
    }

    public void setAreaLevel(String areaLevel) {
        this.areaLevel = areaLevel;
    }

    public String getAreaLng() {
        return areaLng == null ? "" : areaLng;
    }

    public void setAreaLng(String areaLng) {
        this.areaLng = areaLng;
    }

    public String getAreaLat() {
        return areaLat == null ? "" : areaLat;
    }

    public void setAreaLat(String areaLat) {
        this.areaLat = areaLat;
    }

    public String getAreaPinyin() {
        return areaPinyin == null ? "" : areaPinyin;
    }

    public void setAreaPinyin(String areaPinyin) {
        this.areaPinyin = areaPinyin;
    }

    public String getAreaFirst() {
        return areaFirst == null ? "" : areaFirst;
    }

    public void setAreaFirst(String areaFirst) {
        this.areaFirst = areaFirst;
    }

    public Boolean getParent() {
        return isParent;
    }

    public void setParent(Boolean parent) {
        isParent = parent;
    }

    public List<DataAreaDTO> getSubArea() {
        if (subArea == null) {
            return new ArrayList<>();
        }
        return subArea;
    }

    public void setSubArea(List<DataAreaDTO> subArea) {
        this.subArea = subArea;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"areaId\":\"")
                .append(areaId).append('\"');
        sb.append(",\"areaParentId\":\"")
                .append(areaParentId).append('\"');
        sb.append(",\"areaParentName\":\"")
                .append(areaParentName).append('\"');
        sb.append(",\"areaName\":\"")
                .append(areaName).append('\"');
        sb.append(",\"areaCode\":")
                .append(areaCode);
        sb.append(",\"areaCityCode\":\"")
                .append(areaCityCode).append('\"');
        sb.append(",\"areaMergerName\":\"")
                .append(areaMergerName).append('\"');
        sb.append(",\"areaShortName\":\"")
                .append(areaShortName).append('\"');
        sb.append(",\"areaZipCode\":\"")
                .append(areaZipCode).append('\"');
        sb.append(",\"areaLevel\":\"")
                .append(areaLevel).append('\"');
        sb.append(",\"areaLng\":\"")
                .append(areaLng).append('\"');
        sb.append(",\"areaLat\":\"")
                .append(areaLat).append('\"');
        sb.append(",\"areaPinyin\":\"")
                .append(areaPinyin).append('\"');
        sb.append(",\"areaFirst\":\"")
                .append(areaFirst).append('\"');
        sb.append(",\"isParent\":")
                .append(isParent);
        sb.append(",\"subArea\":")
                .append(subArea);
        sb.append('}');
        return sb.toString();
    }
}
