package com.erp.platformsync.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.List;

/**
 * 平台拉取订单响应
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PullOrdersResponse {

    private int total;
    private List<PullOrderItem> orders;

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class PullOrderItem {
        private String orderSn;
        private String platformOrderSn;
        private String platform;
        private Long shopId;
        private BigDecimal totalAmount;
        private String status;
        private String createdTime;
        private String payTime;
        private String receiverName;
        private String receiverPhone;
        private String receiverProvince;
        private String receiverCity;
        private String receiverDistrict;
        private String receiverAddress;
        private List<OrderItem> items;

        @Data
        @Builder
        @NoArgsConstructor
        @AllArgsConstructor
        public static class OrderItem {
            private String skuCode;
            private String skuName;
            private Integer quantity;
            private BigDecimal price;
        }
    }
}
