package com.heyu.api.data.dto.vv;

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

import java.util.List;

/**
 * {
 * 	"message": "ok",
 * 	"nu": "JT3137200563019",
 * 	"ischeck": "1",
 * 	"com": "jtexpress",
 * 	"status": "200",
 * 	"data": [
 * 		        {
 * 			"time": "2025-10-07 15:22:03",
 * 			"context": "包裹已签收！（凭取件码）如有问题请电联：菜鸟公共服务站 15007990693/易康 15870077785，投诉电话：0799-6358103",
 * 			"ftime": "2025-10-07 15:22:03",
 * 			"areaCode": "CN360322000000",
 * 			"areaName": "江西,萍乡市,上栗县",
 * 			"status": "签收"
 *        },
 *        {
 * 			"time": "2025-10-07 10:27:32",
 * 			"context": "快件已由兔兔快递员易康(勿找平台,有事呼叫我)15870077785送达菜鸟公共服务站暂存,取件地址:上栗镇庆丰路皇榜花城（乐享）快递超市,请及时取件。代理点电话:15007990693,投诉电话:0799-6358103",
 * 			"ftime": "2025-10-07 10:27:32",
 * 			"areaCode": "CN360322000000",
 * 			"areaName": "江西,萍乡市,上栗县",
 * 			"status": "派件"
 *        },
 *        {
 * 			"time": "2025-10-07 09:49:36",
 * 			"context": "【萍乡市上栗网点】的兔兔快递员：易康（15870077785）正在为您派件（有事先呼我，勿找平台，少一次投诉，多一份感恩！），投诉电话（0799-6358103/18979901271）。【952300为极兔快递员外呼专属号码，请放心接听】",
 * 			"ftime": "2025-10-07 09:49:36",
 * 			"areaCode": "CN360322101000",
 * 			"areaName": "江西,萍乡市,上栗县,上栗镇",
 * 			"status": "派件"
 *        },
 *        {
 * 			"time": "2025-10-07 09:47:36",
 * 			"context": "快件到达【萍乡市上栗网点】（物流问题无需找商家/平台，请联系956025为您解决）",
 * 			"ftime": "2025-10-07 09:47:36",
 * 			"areaCode": "CN360322000000",
 * 			"areaName": "江西,萍乡市,上栗县",
 * 			"status": "在途"
 *        },
 *        {
 * 			"time": "2025-10-06 23:02:11",
 * 			"context": "快件离开【长沙转运中心B1】已发往【萍乡市上栗网点】（物流问题无需找商家/平台，请联系956025为您解决）",
 * 			"ftime": "2025-10-06 23:02:11",
 * 			"areaCode": "CN430102001000",
 * 			"areaName": "湖南,长沙市,芙蓉区,文艺路",
 * 			"status": "在途"
 *        },
 *        {
 * 			"time": "2025-10-06 22:56:28",
 * 			"context": "快件到达【长沙转运中心B1】（物流问题无需找商家/平台，请联系956025为您解决）",
 * 			"ftime": "2025-10-06 22:56:28",
 * 			"areaCode": "CN430102000000",
 * 			"areaName": "湖南,长沙市,芙蓉区",
 * 			"status": "在途"
 *        },
 *        {
 * 			"time": "2025-10-05 20:43:19",
 * 			"context": "快件离开【济南转运中心】已发往【长沙转运中心B1】（物流问题无需找商家/平台，请联系956025为您解决）",
 * 			"ftime": "2025-10-05 20:43:19",
 * 			"areaCode": "CN370115000000",
 * 			"areaName": "山东,济南市,济阳区",
 * 			"status": "在途"
 *        },
 *        {
 * 			"time": "2025-10-05 20:38:23",
 * 			"context": "快件到达【济南转运中心】（物流问题无需找商家/平台，请联系956025为您解决）",
 * 			"ftime": "2025-10-05 20:38:23",
 * 			"areaCode": "CN370115000000",
 * 			"areaName": "山东,济南市,济阳区",
 * 			"status": "在途"
 *        },
 *        {
 * 			"time": "2025-10-05 15:11:03",
 * 			"context": "快件离开【德州经开新区网点】已发往【济南转运中心】（物流问题无需找商家/平台，请联系956025为您解决）",
 * 			"ftime": "2025-10-05 15:11:03",
 * 			"areaCode": "CN371402000000",
 * 			"areaName": "山东,德州市,德城区",
 * 			"status": "在途"
 *        },
 *        {
 * 			"time": "2025-10-05 15:10:53",
 * 			"context": "【德州经开新区网点】的刘磊（19053400422）已取件（物流问题无需找商家/平台，请联系：0534-7024537为您解决）",
 * 			"ftime": "2025-10-05 15:10:53",
 * 			"areaCode": "CN371402000000",
 * 			"areaName": "山东,德州市,德城区",
 * 			"status": "揽收"
 *        }
 * 	],
 * 	"state": "3",
 * 	"condition": "F00",
 * 	"routeInfo": {
 * 		"from": {
 * 			"number": "CN371402000000",
 * 			"name": "山东,德州市,德城区"
 *        },
 * 		"cur": {
 * 			"number": "CN360322000000",
 * 			"name": "江西,萍乡市,上栗县"
 *        },
 * 		"to": {
 * 			"number": "CN360322000000",
 * 			"name": "江西,萍乡市,上栗县"
 *        }    * 	},
 * 	"isLoop": false,
 * 	"courierInfo": {
 * 		"deliveryManPhone": "15870077785,15007990693",
 * 		"pickupManPhone": "19053400422",
 * 		"deliveryManName": "员易康",
 * 		"pickupManName": "刘磊"    * 	}
 * }
 */
@NoArgsConstructor
@Data
public class KuaiDi100DTO {
    @JsonProperty("message")
    private String message; // 消息体，请忽略
    @JsonProperty("nu")
    private String nu; //  	单号
    @JsonProperty("ischeck")
    private String ischeck; // 是否签收标记，0未签收，1已签收，请忽略，明细状态请参考state字段
    @JsonProperty("com")
    private String com;             // 快递公司编码,一律用小写字母
    @JsonProperty("status")
    private String status;        //   通讯状态，请忽略
    @JsonProperty("data")
    private List<DataDTO> data;    //
    @JsonProperty("state")
    private String state;       // 快递单当前状态，默认为0在途，1揽收，2疑难，3签收，4退签，5派件，8清关，14拒签等10个基础物流状态，如需要返回高级物流状态，请参考 resultv2 传值
    @JsonProperty("condition")
    private String condition;           // 快递单明细状态标记，暂未实现，请忽略
    @JsonProperty("routeInfo")
    private RouteInfoDTO routeInfo;
    @JsonProperty("isLoop")
    private Boolean isLoop;
    @JsonProperty("courierInfo")
    private CourierInfoDTO courierInfo;                 // 从物流轨迹中提取出的快递员信息，当且仅当入参needCourierInfo=True时会返回






    @NoArgsConstructor
    @Data
    public static class RouteInfoDTO {
        @JsonProperty("from")
        private FromDTO from;       // 从哪里发货
        @JsonProperty("cur")
        private CurDTO cur;         // 当前在哪里
        @JsonProperty("to")
        private ToDTO to;           // 发货到哪里

        @NoArgsConstructor
        @Data
        public static class FromDTO {
            @JsonProperty("number")
            private String number;          // 地址编码
            @JsonProperty("name")
            private String name;        // 名称
        }

        @NoArgsConstructor
        @Data
        public static class CurDTO {
            @JsonProperty("number")
            private String number;
            @JsonProperty("name")
            private String name;
        }

        @NoArgsConstructor
        @Data
        public static class ToDTO {
            @JsonProperty("number")
            private String number;
            @JsonProperty("name")
            private String name;
        }
    }

    @NoArgsConstructor
    @Data
    public static class CourierInfoDTO {
        @JsonProperty("deliveryManPhone")
        private String deliveryManPhone;                //派件快递员手机号，格式为："12335467890"，如提取出多个手机号，会使用逗号分隔，例如"1234567890,1983782937",提取不到会返回空字符串
        @JsonProperty("pickupManPhone")
        private String pickupManPhone;                  // 揽件快递员姓名，例如："张三"，如提取不到会返回空字符串
        @JsonProperty("deliveryManName")
        private String deliveryManName;             // 派件快递员姓名，例如："李四"，如提取不到会返回空字符串
        @JsonProperty("pickupManName")
        private String pickupManName;           // 揽件快递员姓名，例如："张三"，如提取不到会返回空字符串
    }

    @NoArgsConstructor
    @Data
    public static class DataDTO {
        @JsonProperty("time")
        private String time;                    // 	时间，原始格式
        @JsonProperty("context")
        private String context;             //内容
        @JsonProperty("ftime")
        private String ftime;               // 格式化后时间
        @JsonProperty("areaCode")
        private String areaCode;            //本数据元对应的行政区域的编码，实时查询接口中提交resultv2=1或者resultv2=4或者resultv2=8标记后才会出现
        @JsonProperty("areaName")
        private String areaName;                //本数据元对应的行政区域的名称，实时查询接口中提交resultv2=1或者resultv2=4或者resultv2=8标记后才会出现
        @JsonProperty("status")
        private String status;                      // 本数据元对应的物流状态名称或者高级状态名称，实时查询接口中提交resultv2=1或者resultv2=4或者resultv2=8标记后才会出现
    }
}
