package cn.com.ty.lift.quan.news.dao.entity;

import lombok.Data;
import lombok.ToString;

@Data
@ToString
public class MapInfo {
    String status;
    Result result;

    public String getCity() {
        return getResult().getAddressComponent().getCity();
    }
}

@Data
@ToString
class Result {
    Location location;
    String formatted_address;
    String business;
    Integer cityCode;
    AddressComponent addressComponent;
}

@Data
@ToString
class AddressComponent {
    String city;
    String direction;
    String distance;
    String district;
    String province;
    String street;
    String street_number;
}

@Data
@ToString
class Location {
    float lng;
    float lat;
}
