package com.ruoyi.demo.entity.bo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;

import com.ruoyi.demo.entity.WdInfo;
import com.ruoyi.demo.entity.WdTopologicalInfo;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Data
@TableName("bl_wd_topological_info")
public class WdTopologicalInfoBo implements Serializable {
    private String wdId;
    private String wdName;
    private String wdTypeCode;

    private String typeCodeBy;

    private String addrCode;
    private String addrCodeInfo;
    private String addrInfo;
    private BigDecimal lat;
    private BigDecimal lng;
    private String geoHash;
    private List<String> tag;

    private int attention;

    @TableField("analyse_time")
    private LocalDateTime analyseTime;

    public WdTopologicalInfoBo(WdInfo wdInfo) {
        this.wdId = wdInfo.getWdId();
        this.wdName = wdInfo.getWdName();
        this.wdTypeCode = wdInfo.getWdTypeCode();
        this.typeCodeBy = wdInfo.getTypeCodeBy();
        this.addrCode = wdInfo.getAddrCode();
        this.addrInfo = wdInfo.getAddrInfo();
        this.lat = wdInfo.getLat();
        this.lng = wdInfo.getLng();
        this.geoHash = wdInfo.getGeoHash();
    }

    public WdTopologicalInfoBo() {
    }

    public WdTopologicalInfoBo(WdTopologicalInfo wdInfo) {
        this.wdId = wdInfo.getCenterWdId();
        this.wdName = wdInfo.getCenterWdName();
        this.wdTypeCode = wdInfo.getCenterWdTypeCode();
        this.typeCodeBy = wdInfo.getTypeCodeBy();
        this.addrCode = wdInfo.getAddrCode();
        this.addrInfo = wdInfo.getAddrInfo();
        this.lat = wdInfo.getLat();
        this.lng = wdInfo.getLng();
        this.geoHash = wdInfo.getGeoHash();
    }
}
