package com.erp.warehouse.dto;

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

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

/**
 * 销售订单DTO - 用于推送到云仓
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class SaleOrderDTO {

    /** 订单号 */
    private String orderNo;

    /** 店铺编码 */
    private String shopNo;

    /** 仓库编码 */
    private String warehouseCode;

    /** 收货人姓名 */
    private String receiverName;

    /** 收货人电话 */
    private String receiverPhone;

    /** 收货省份 */
    private String receiverProvince;

    /** 收货城市 */
    private String receiverCity;

    /** 收货区县 */
    private String receiverDistrict;

    /** 收货地址 */
    private String receiverAddress;

    /** 物流编码 */
    private String logisticsCode;

    /** 物流单号 */
    private String logisticsNo;

    /** 备注 */
    private String remark;

    /** 商品明细 */
    private List<SaleOrderItemDTO> items;

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Builder
    public static class SaleOrderItemDTO {
        /** SKU编码 */
        private String skuCode;
        
        /** 商品名称 */
        private String name;
        
        /** 数量 */
        private Integer quantity;
        
        /** 单价 */
        private BigDecimal price;
    }
}
