mitao
2025-01-20 93fec20f3cf9d7801eeaa10acef4687ed110d435
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
package com.zzg.system.domain;
 
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
 
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
 
/**
 * 镇村组数据
 *
 * @TableName sys_city
 */
@Data
public class SysCity implements Serializable {
 
    public static String DEFAULT_PID = "0";
 
    /**
     * 行政级别
     */
    public static final Integer CITY_LEVEL = 0;
    public static final Integer TOWN_LEVEL = 1;
    public static final Integer VILLAGE_LEVEL = 2;
    public static final Integer GROUPS_LEVEL = 3;
 
    /**
     * 状态
     */
    @TableId(type = IdType.ASSIGN_UUID)
    @NotBlank(message = "[ID]不能为空")
    @Size(max = 40, message = "编码长度不能超过40")
    @Length(max = 40, message = "编码长度不能超过40")
    private String id;
    /**
     * 父id
     */
    @Size(max = 40, message = "编码长度不能超过40")
    @Length(max = 40, message = "编码长度不能超过40")
    private String pid;
    /**
     * 名称
     */
    @Size(max = 255, message = "编码长度不能超过255")
    @Length(max = 255, message = "编码长度不能超过255")
    private String name;
    /**
     * 编码
     */
    @Size(max = 255, message = "编码长度不能超过255")
    @Length(max = 255, message = "编码长度不能超过255")
    private String code;
    /**
     * 排序
     */
    private Integer ranking;
    /**
     * 级别
     */
    private Integer level;
    /**
     * 状态:0正常,1不正常(撤销,合并)
     */
    private Integer state;
    /**
     * 备注
     */
    @Size(max = 255, message = "编码长度不能超过255")
    @Length(max = 255, message = "编码长度不能超过255")
    private String remark;
 
    @TableField(value = "create_time")
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    Date createTime;
    @TableField(value = "create_name")
    @ApiModelProperty(value = "创建人")
    String createName;
 
    @TableField(exist = false)
    List<SysCity> childList;
    @TableField(exist = false)
    String town = "";
    @TableField(exist = false)
    String village = "";
    @TableField(exist = false)
    String groups = "";
}