package com.czg.order.vo;

import com.mybatisflex.core.paginate.Page;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * 数据汇总-商品销售
 * @author tankaikai
 * @since 2025-03-07 15:50
 */
@NoArgsConstructor
@Data
public class DataSummaryProductSaleVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;


    /**
     * productSum
     */
    private ProductSumVo productSum = new ProductSumVo();
    /**
     * countList
     */
    private List<CountListVo> countList = new ArrayList<>();
    /**
     * productCount
     */
    private ProductCountVo productCount = new ProductCountVo();
    /**
     * productList
     */
    private Page<ContentVo> productList = new Page<ContentVo>(new ArrayList<ContentVo>(), 1, 10, 0);

    /**
     * ProductSumVo
     */
    @NoArgsConstructor
    @Data
    public static class ProductSumVo {
        /**
         * icon
         */
        private String icon;
        /**
         * isAmount
         */
        private String isAmount;
        /**
         * payAmount
         */
        private BigDecimal payAmount;
        /**
         * payType
         */
        private String payType;
        /**
         * saveAmount
         */
        private BigDecimal saveAmount;
    }

    /**
     * ProductCountVo
     */
    @NoArgsConstructor
    @Data
    public static class ProductCountVo {
        /**
         * icon
         */
        private String icon;
        /**
         * isAmount
         */
        private String isAmount;
        /**
         * payAmount
         */
        private BigDecimal payAmount;
        /**
         * payType
         */
        private String payType;
        /**
         * saveAmount
         */
        private BigDecimal saveAmount;
    }
    /**
     * ContentVo
     */
    @NoArgsConstructor
    @Data
    public static class ContentVo {
        /**
         * cateName
         */
        private String cateName;
        /**
         * num
         */
        private BigDecimal num;
        /**
         * price
         */
        private BigDecimal price;
        /**
         * productId
         */
        private Object productId;
        /**
         * productName
         */
        private String productName;
        /**
         * productSkuId
         */
        private Long productSkuId;
        /**
         * productSkuName
         */
        private String productSkuName;
        /**
         * refAmount
         */
        private BigDecimal refAmount;
        /**
         * refNum
         */
        private BigDecimal refNum;
        /**
         * salesAmount
         */
        private BigDecimal salesAmount;
        /**
         * 销售数量
         */
        private BigDecimal salesNum;
        /**
         * 单位名称
         */
        private String unitName;
    }

    /**
     * CountListVo
     */
    @NoArgsConstructor
    @Data
    public static class CountListVo {
        /**
         * 销售额
         */
        private BigDecimal saleAmount;
        /**
         * 销售量
         */
        private BigDecimal saleNum;
        /**
         * 日期
         */
        private String tradeDay;
    }
}
