package com.mosty.base.model.dto.sjzx;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Map;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class NeighborDTO implements Comparable<NeighborDTO> {

    @ApiModelProperty("点位")
    private BxdCreatedDto point;

    @ApiModelProperty("点位和附近点位的距离")
    private Map<BxdCreatedDto, Long> neighbors;

    @Override
    public int compareTo(NeighborDTO o) {
        return o.getNeighbors().size() - neighbors.size();
    }

}
