package com.erp.product.dto;

import lombok.Data;

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

/**
 * 商品数据传输对象
 */
@Data
public class GoodsDTO {
    
    private Long id;
    private String name;
    private String code;
    private String barcode;
    private String category;
    private String unit;
    private BigDecimal weight;
    private BigDecimal retailPrice;
    private BigDecimal costPrice;
    private Integer stockWarning;
    private String type;
    private String typeLabel;
    private String customId;
    private BigDecimal packagingCost;
    private BigDecimal shippingPackagingCost;
    private BigDecimal volume;
    private BigDecimal length;
    private BigDecimal width;
    private BigDecimal height;
    private Long brandId;
    private Boolean batchManagement;
    private LocalDateTime createdAt;
    private LocalDateTime updatedAt;
    
    /**
     * 品牌信息
     */
    private BrandSimpleDTO brand;
    
    /**
     * 供应商列表
     */
    private List<SupplierSimpleDTO> suppliers;
    
    /**
     * 组套商品子项（仅combo类型）
     */
    private List<ComboItemDTO> comboItems;
    
    /**
     * 品牌简单DTO
     */
    @Data
    public static class BrandSimpleDTO {
        private Long id;
        private String name;
    }
    
    /**
     * 供应商简单DTO
     */
    @Data
    public static class SupplierSimpleDTO {
        private Long id;
        private String name;
    }
    
    /**
     * 组套子项DTO
     */
    @Data
    public static class ComboItemDTO {
        private Long goodsId;
        private String goodsName;
        private String goodsCode;
        private Integer quantity;
    }
}
