package com.ruoyi.ibs.grid.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;

/**
 * 行政区划地理围栏对象 grid_mgmt_admin_division
 *
 * @author ruoyi
 * @date 2024-09-10
 */

@Data
@TableName("grid_admin_division")
public class AdminDivision implements Serializable {

    /**
     * 主键id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 省
     */
    @Excel(name = "省")
    private String province;

    /**
     * 市
     */
    @Excel(name = "市")
    private String city;

    /**
     * 区县
     */
    @Excel(name = "区县")
    private String county;

    /**
     * 街道
     */
    @Excel(name = "街道")
    private String town;

    /**
     * 村
     */
    @Excel(name = "村")
    private String village;

    /**
     * 行政编码
     */
    @Excel(name = "行政编码")
    private String code;

    /**
     * 父级行政编码
     */
    @Excel(name = "父级行政编码")
    private String parentCode;

    /**
     * 行政区划等级
     */
    @Excel(name = "行政区划等级")
    private Integer level;

    /**
     * 数据标签
     */
    @Excel(name = "数据标签")
    private String label;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("province", getProvince())
                .append("city", getCity())
                .append("county", getCounty())
                .append("town", getTown())
                .append("village", getVillage())
                .append("code", getCode())
                .append("parentCode", getParentCode())
                .append("level", getLevel())
                .toString();
    }
}
