package com.yiqi.system.domain;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.yiqi.common.annotation.Excel;

/**
 * 地区码对象 sys_area
 *
 * @author ruoyi
 * @date 2023-07-22
 */
@Data
@ApiModel("地区码表")
@TableName("sys_area")
public class SysArea{

    private static final long serialVersionUID=1L;

    /** 地区Id */
    @TableId(type = IdType.AUTO)
    private Long areaId;

    /** 地区编码 */
    @Excel(name = "地区编码")
    private String areaCode;

    /** 地区名 */
    @Excel(name = "地区名")
    private String areaName;

    /** 地区级别（1:省份province,2:市city,3:区县district,4:街道street） */
    @Excel(name = "地区级别", readConverterExp = "1=:省份province,2:市city,3:区县district,4:街道street")
    private Long level;

    /** 城市编码 */
    @Excel(name = "城市编码")
    private String cityCode;

    /** 城市中心点（即：经纬度坐标） */
    @Excel(name = "城市中心点", readConverterExp = "即=：经纬度坐标")
    private String center;

    /** 地区父节点 */
    @Excel(name = "地区父节点")
    private String parentId;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private BigDecimal longitude;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private BigDecimal latitude;

    @Override
    public String toString(){
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("areaId",getAreaId())
                .append("areaCode",getAreaCode())
                .append("areaName",getAreaName())
                .append("level",getLevel())
                .append("cityCode",getCityCode())
                .append("center",getCenter())
                .append("parentId",getParentId())
                .append("longitude",getLongitude())
                .append("latitude",getLatitude())
                .toString();
    }
}
