1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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;
    }
 
}