package com.yida.data.common.core.entity.system;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

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

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

/**
 * 区域信息
 */
@Data
@ApiModel
public class EduArea implements Serializable {

    private static final long serialVersionUID = 2027933525618469650L;

    @TableId(type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("区域名称")
    private String name;

    @ApiModelProperty("父区域Id")
    private Long parentId;

    @ApiModelProperty("父区域名称")
    private String parentName;

    @ApiModelProperty("区域名称，区域类型，0-省，1-市，2-县/区,3-镇")
    private Integer type;

    @ApiModelProperty("子节点")
    private transient List<EduArea> children = new ArrayList<>();

}
