package com.erp.tenant.dto.goods;

import com.erp.common.core.model.PageResponse;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

/**
 * 商品分页响应DTO
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class GoodsPageResponse {

    private PageResponse<GoodsItemDTO> goods;

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class GoodsItemDTO {
        private Long id;
        private String goodsCode;
        private String name;
        private String alias;
        private String barCode;
        private Long categoryId;
        private String categoryName;
        private Long brandId;
        private String brandName;
        private BigDecimal salePrice;
        private BigDecimal costPrice;
        private String unit;
        private Integer weight;
        private Integer safeStock;
        private Integer warningThreshold;
        private Integer status;
        private String statusText;
        private Integer stockQuantity;
        private Integer availableQuantity;
        private String description;
        private String images;
        private String remark;
        private String createdAt;
        private String updatedAt;
    }
}
