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 = "";
|
}
|