package com.ycl.platform.domain.vo; import com.ycl.platform.base.AbsVo; import com.ycl.platform.domain.entity.Region; import java.util.List; import java.time.LocalDateTime; import enumeration.general.RegionLevelEnum; import org.springframework.lang.NonNull; import org.springframework.beans.BeanUtils; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.experimental.Accessors; /** * 地域展示 * * @author xp * @since 2024-03-12 */ @Data @Accessors(chain = true) public class RegionVO extends AbsVo { /** 区域全称 */ private String fullName; /** 区域简称 */ private String simpleName; /** 地域级别 */ private RegionLevelEnum regionLevel; /** 市 */ private String city; /** 区县 */ private String county; /** 父级id */ private Integer parentId; public static RegionVO getVoByEntity(@NonNull Region entity, RegionVO vo) { if(vo == null) { vo = new RegionVO(); } BeanUtils.copyProperties(entity, vo); return vo; } }