package com.usky.sas.service.dto.agbox;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;

import java.util.List;

/**
 * AG 接口 getDeviceList 响应
 */
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class AgboxDeviceListVo {

    private AgboxDeviceResult result;

    @Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class AgboxDeviceResult {
        /** 设备列表 */
        private List<AgboxDeviceInfo> deviceList;
    }

    @Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class AgboxDeviceInfo {
        private String deviceId;
        /** 触发时间，可能为日期时间字符串 */
        private String triggerTime;
        private String note;
        private String ipAddr;
        private String villageCode;
        private String address;
        /** 经纬度信息，可选 */
        private AgboxGisInfo gis;
    }

    @Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class AgboxGisInfo {
        private Double lon;
        private Double lat;
        private Double alt;
    }
}
