package com.ningdatech.carapi.sys.entity.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * <p>
 * RegionTreeVO
 * </p>
 *
 * @author WendyYang
 * @since 10:35 2022/10/12
 */
@Data
@ToString(callSuper = true)
@ApiModel(value = "RegionTreeVO", description = "区域树状结构VO")
public class RegionTreeVO {

    private Long id;

    @ApiModelProperty("区域码")
    @NotBlank(message = "地区编码不能为空")
    private String regionCode;

    @ApiModelProperty("地区名")
    @NotBlank(message = "地区名称不能为空")
    private String name;

    @ApiModelProperty("级别")
    @NotNull(message = "级别不能为空")
    private Integer level;

    @ApiModelProperty("区域级别")
    @NotBlank(message = "区域级别不能为空")
    private String govUnit;

    @ApiModelProperty("地区父级编码：-1为顶级区域")
    @NotBlank(message = "地区父级编码不能为空")
    private String parentCode;

    @ApiModelProperty("子区域")
    private List<RegionTreeVO> children;

    @ApiModelProperty("唯一编码：regionCode##name##level")
    private String unionCode;

    @ApiModelProperty("地图数据")
    @NotBlank(message = "地图数据不能为空")
    private String mapData;

    @ApiModelProperty("企业信息")
    private List<RegionTreeCompanyVO> companyList;

}
