package org.jeecg.modules.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.List;

/**
 * @Description: sys_area
 * @Author: jeecg-boot
 * @Date: 2022-01-05
 * @Version: V1.0
 */
@Data
@TableName("sys_area")
@ApiModel(value = "sys_area对象", description = "sys_area")
public class SysArea implements Serializable {
    private static final long serialVersionUID = 1L;

    /**ID*/
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "ID")
    private String id;
    /**上级区划ID*/
    @Excel(name = "上级区划ID", width = 15, dictTable = "sys_area", dicText = "area_name", dicCode = "id")
    @Dict(dictTable = "sys_area", dicText = "area_name", dicCode = "id")
    @ApiModelProperty(value = "上级区划ID")
    private String parentId;
    /**上级区划名称*/
    @Excel(name = "上级区划名称", width = 15)
    @ApiModelProperty(value = "上级区划名称")
    private String parentAreaName;
	/**区划名称*/
	@Excel(name = "区划名称", width = 15)
    @ApiModelProperty(value = "区划名称")
    private String areaName;
	/**区划编码*/
	@Excel(name = "区划编码", width = 15)
    @ApiModelProperty(value = "区划编码")
    private String areaCode;
    /**区划类型*/
    @Excel(name = "区划类型", width = 15)
    @ApiModelProperty(value = "区划类型")
    private Integer areaType;
	/**区划简称*/
	@Excel(name = "区划简称", width = 15)
    @ApiModelProperty(value = "区划简称")
    private String areaShortName;
	/**状态（1启动，0不启动）*/
	@Excel(name = "状态（1启动，0不启动）", width = 15)
    @ApiModelProperty(value = "状态（1启动，0不启动）")
    @Dict(dicCode = "area_status")
    private String status;
	/**删除状态（0正常，1已删除）*/
	@Excel(name = "删除状态（0正常，1已删除）", width = 15)
    @ApiModelProperty(value = "删除状态（0正常，1已删除）")
    @Dict(dicCode = "area_del_flag")
    @TableLogic
    private Integer delFlag;
	/**区划描述*/
	@Excel(name = "区划描述", width = 15)
    @ApiModelProperty(value = "区划描述")
    private String description;
	/**是否特殊区域（0否，1是）*/
	@Excel(name = "是否特殊区域（0否，1是）", width = 15)
    @ApiModelProperty(value = "是否特殊区域（0否，1是）")
    @Dict(dicCode = "is_special")
    private Integer isSpecial;
	/**地区行使层级*/
	@Excel(name = "地区行使层级", width = 15)
    @ApiModelProperty(value = "地区行使层级")
    private String performLevel;
	/**1省级，2市级，3区县级，4乡镇级，5村*/
	@Excel(name = "区域等级(1省级，2市级，3区县级，4乡镇级，5村)", width = 15)
    @ApiModelProperty(value = "区域等级(1省级，2市级，3区县级，4乡镇级，5村)")
    @Dict(dicCode = "area_level")
    private String areaLevel;
	/**区划排序*/
	@Excel(name = "区划排序", width = 15)
    @ApiModelProperty(value = "区划排序")
    private Integer areaOrder;
	/**省级id*/
	@Excel(name = "省级id", width = 15)
    @ApiModelProperty(value = "省级id")
    private String province;
	/**市级id*/
	@Excel(name = "市级id", width = 15)
    @ApiModelProperty(value = "市级id")
    private String city;
	/**县级id*/
	@Excel(name = "县级id", width = 15)
    @ApiModelProperty(value = "县级id")
    private String county;
	/**乡镇id*/
	@Excel(name = "乡镇id", width = 15)
    @ApiModelProperty(value = "乡镇id")
    private String town;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    @TableField(fill = FieldFill.INSERT)
    private java.util.Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
	/**更新时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.UPDATE)
    private java.util.Date updateTime;
	/**是否有子节点*/
	@Excel(name = "是否有子节点", width = 15, dicCode = "yn")
	@Dict(dicCode = "yn")
    @ApiModelProperty(value = "是否有子节点")
    private String hasChild;

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    @TableField(exist = false)
    private List<SysArea> children;

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    @TableField(exist = false)
    private List<String> childId;
}
