package com.zhongshu.card.client.model.org;

import com.zhongshu.card.client.utils.ITree;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

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

@Data
@NoArgsConstructor
@AllArgsConstructor
public class RegionModel implements ITree<RegionModel>, Serializable {

    private String id;

    /**
     * 编号
     */
    @Schema(description = "编号")
    private String code;


    @Schema(description = "地区名称")
    private String name;

    /**
     * 省市区province、city、county
     */
    @Schema(description = "省市区province、市city、村county")
    private String type;

    @Schema(description = "上级ID")
    private String parentId;

    @Schema(description = "子层级")
    private List<RegionModel> children = new ArrayList<>();

}
