package com.prolog.cs.biz.outbound.model.vo.faceorder;

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

import java.util.List;
import java.util.Map;

@NoArgsConstructor
@Data
public class JdKyOrderAddVO {


    @JsonProperty("carrierCode")
    private String carrierCode;
    @JsonProperty("params")
    private List<JdKyParamsDTO> params;

    @NoArgsConstructor
    @Data
    public static class JdKyParamsDTO {
        @JsonProperty("orderType")
        private Integer orderType;
        @JsonProperty("orderId")
        private String orderId;
        @JsonProperty("clientNo")
        private String clientNo;
        @JsonProperty("remark")
        private String remark;
        @JsonProperty("cargosContact")
        private CargosContactDTO cargosContact;
        @JsonProperty("coldChainApiRequest")
        private ColdChainApiRequestDTO coldChainApiRequest;
        @JsonProperty("receiverContact")
        private ReceiverContactDTO receiverContact;
        @JsonProperty("deliveryType")
        private Integer deliveryType;
        @JsonProperty("ownerNo")
        private String ownerNo;
        @JsonProperty("senderContact")
        private SenderContactDTO senderContact;
        @JsonProperty("addedProductsApiRequest")
        private AddedProductsApiRequestDTO addedProductsApiRequest;
        @JsonProperty("productsReq")
        private ProductsReqBean productsReqBean;
        @JsonProperty("settleType")
        private Integer settleType;




        @NoArgsConstructor
        @Data
        public static class CargosContactDTO {
            @JsonProperty("grossWeight")
            private Integer grossWeight;
            @JsonProperty("grossVolume")
            private Integer grossVolume;
            @JsonProperty("expressItemName")
            private String expressItemName;
            @JsonProperty("packageQty")
            private Integer packageQty;
        }

        @NoArgsConstructor
        @Data
        public static class ColdChainApiRequestDTO {
            @JsonProperty("siteCollect")
            private Integer siteCollect;
            @JsonProperty("warmLayer")
            private Integer warmLayer;
            @JsonProperty("siteDelivery")
            private Integer siteDelivery;
        }

        @NoArgsConstructor
        @Data
        public static class ReceiverContactDTO {
            @JsonProperty("receiverCompany")
            private String receiverCompany;
            @JsonProperty("receiverProvince")
            private String receiverProvince;
            @JsonProperty("receiverCounty")
            private String receiverCounty;
            @JsonProperty("receiverCity")
            private String receiverCity;
            @JsonProperty("receiverPhone")
            private String receiverPhone;
            @JsonProperty("receiverProvinceName")
            private String receiverProvinceName;
            @JsonProperty("receiverTown")
            private String receiverTown;
            @JsonProperty("receiverName")
            private String receiverName;
            @JsonProperty("receiverMobile")
            private String receiverMobile;
            @JsonProperty("receiverAddress")
            private String receiverAddress;
            @JsonProperty("receiverCityName")
            private String receiverCityName;
            @JsonProperty("receiverTownName")
            private String receiverTownName;
            @JsonProperty("receiverCountyName")
            private String receiverCountyName;
            @JsonProperty("receiverOAID")
            private String receiverOAID;
        }

        @NoArgsConstructor
        @Data
        public static class SenderContactDTO {
            @JsonProperty("senderAddress")
            private String senderAddress;
            @JsonProperty("senderProvinceName")
            private String senderProvinceName;
            @JsonProperty("senderCompany")
            private String senderCompany;
            @JsonProperty("senderCityName")
            private String senderCityName;
            @JsonProperty("senderMobile")
            private String senderMobile;
            @JsonProperty("senderCounty")
            private String senderCounty;
            @JsonProperty("senderProvince")
            private String senderProvince;
            @JsonProperty("senderCity")
            private String senderCity;
            @JsonProperty("senderPhone")
            private String senderPhone;
            @JsonProperty("senderName")
            private String senderName;
            @JsonProperty("senderTown")
            private String senderTown;
            @JsonProperty("senderCountyName")
            private String senderCountyName;
            @JsonProperty("senderTownName")
            private String senderTownName;
        }

        @NoArgsConstructor
        @Data
        public static class ProductsReqBean{

            @JsonProperty("addedProducts")
            private List<CommonProductInfo> commonProductInfos;

            @NoArgsConstructor
            @Data
            public static class CommonProductInfo {

                @JsonProperty("productAttrs")
                Map<String,String> productAttrs;
            }

        }

        @NoArgsConstructor
        @Data
        public static class AddedProductsApiRequestDTO {
            @JsonProperty("guaranteeValueAmount")
            private Double guaranteeValueAmount;
        }



    }
}
