package com.erp.warehouse.dto;

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

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

/**
 * 采购单DTO - 用于推送到云仓
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class PurchaseOrderDTO {

    /** 采购单号 */
    private String poOrderNo;

    /** 供应商编码 */
    private String supplierCode;

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

    /** 预计到货日期 */
    private LocalDate expectedDate;

    /** 备注 */
    private String remark;

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

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