package com.czg.order.vo;

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:35
 */
@NoArgsConstructor
@Data
public class DataSummaryTradeVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * sale
     */
    private SaleVo sale = new SaleVo();
    /**
     * count
     */
    private CountVo count = new CountVo();
    /**
     * vip
     */
    private VipVo vip = new VipVo();

    /**
     * SaleVo
     */
    @NoArgsConstructor
    @Data
    public static class SaleVo {
        /**
         * 会员退款金额
         */
        private BigDecimal outAmount;
        /**
         * 总金额
         */
        private BigDecimal totalSaleAmount;
        /**
         * 会员总金额
         */
        private BigDecimal totalVipAmount;
        /**
         * 会员充值金额
         */
        private BigDecimal inAmount;
        /**
         * 总实收
         */
        private BigDecimal incomeAmountAll;
        /**
         * 销售收款金额
         */
        private BigDecimal incomeAmount;
        /**
         * payCount
         */
        private List<PayCountVo> payCount = new ArrayList<>();
        /**
         * 销售退款金额
         */
        private BigDecimal refundAmount;

        /**
         * PayCountVo
         */
        @NoArgsConstructor
        @Data
        public static class PayCountVo {
            /**
             * 图标
             */
            private String icon;
            /**
             * isAmount
             */
            private String isAmount;
            /**
             * 金额
             */
            private Integer payAmount;
            /**
             * 描述
             */
            private String payType;
            /**
             * saveAmount
             */
            private BigDecimal saveAmount;
        }
    }

    /**
     * CountVo
     */
    @NoArgsConstructor
    @Data
    public static class CountVo {
        /**
         * 客单价
         */
        private Integer unitPrice;
        /**
         * 翻台率
         */
        private String turnoverRate;
        /**
         * 优惠单数
         */
        private Integer saveNum;
        /**
         * 优惠金额
         */
        private BigDecimal saveAmount;
    }

    /**
     * VipVo
     */
    @NoArgsConstructor
    @Data
    public static class VipVo {
        /**
         * 会员消费笔数
         */
        private Integer useNum;
        /**
         * 新增会员数
         */
        private Integer newFlow;
        /**
         * 会员消费金额
         */
        private BigDecimal useAmount;
    }
}
