
package com.tmerclub.cloud.api.delivery.bo;

import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.Objects;

/**
 * @author tmerclub
 * @date 2020/12/16
 */
@Data
public class BmapPointBO implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    /**
     * 经度
     */
    private Double lng;

    /**
     * 纬度
     */
    private Double lat;

    public BmapPointBO() {

    }

    public BmapPointBO(Double lng, Double lat) {
        this.lng = lng;
        this.lat = lat;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj instanceof BmapPointBO) {
            BmapPointBO bmapPoint = (BmapPointBO) obj;
            return (Objects.equals(bmapPoint.getLng(), lng) && Objects.equals(bmapPoint.getLat(), lat));
        } else {
            return false;
        }
    }

    @Override
    public int hashCode() {
        return Objects.hash(lng, lat);
    }

    @Override
    public String toString() {
        return "BmapPointBO{" +
                "lng=" + lng +
                ", lat=" + lat +
                '}';
    }
}
