package com.qaup.collision.datacollector.dto;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;

/**
 * 航空器路由API响应DTO
 * 
 * @author AI Assistant
 * @version 1.0
 * @since 2025-01-17
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
public class AircraftRouteDTO {
    
    /**
     * 路由类型 (IN: 进港, OUT: 出港)
     */
    private String type;
    
    /**
     * 路由状态 (COMPLETE: 完成, CALCULATING: 计算中, MODIFIED: 已修改)
     */
    private String status;
    
    /**
     * 路由编码序列 (如: "F1,L4,138")
     */
    private String codes;
    
    /**
     * 路由几何图形 (通常为null，使用geoPath)
     */
    private Object geometry;
    
    /**
     * 路由路径 (GeoJSON格式)
     */
    private GeoPath geoPath;
    
    /**
     * GeoJSON路径数据
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class GeoPath {
        
        /**
         * GeoJSON类型，通常为"FeatureCollection"
         */
        private String type;
        
        /**
         * 路径特征集合
         */
        private List<Feature> features;
    }
    
    /**
     * GeoJSON特征
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class Feature {
        
        /**
         * 特征类型，通常为"Feature"
         */
        private String type;
        
        /**
         * 几何图形信息
         */
        private Geometry geometry;
        
        /**
         * 属性信息
         */
        private Properties properties;
    }
    
    /**
     * 几何图形信息
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class Geometry {
        
        /**
         * 几何类型，通常为"LineString"
         */
        private String type;
        
        /**
         * 坐标数组 [[经度, 纬度], [经度, 纬度], ...]
         */
        private List<List<Double>> coordinates;
    }
    
    /**
     * 属性信息
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class Properties {
        
        /**
         * 路径段编码
         */
        private String code;
    }
}