package com.codvision.base.entity.vo;

import com.codvision.base.entity.Region;
import com.codvision.commoncore.utils.BeanUtil;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 行政区域展示信息
 * </p>
 *
 * @author zz
 * @since 2023-08-09
 */
@Data
@NoArgsConstructor
@ApiModel(value = "RegionVO", description = "行政区域展示信息")
public class RegionVO extends Region {

    private static final long serialVersionUID = 1L;

    /**
     * 子信息
     */
    private List<RegionVO> children;

    public RegionVO(Region region) {
        BeanUtil.copyProperties(region, this);
        this.children = new ArrayList<>();
    }

}
