package com.ruoyi.dashboard.domain.revenueStat;

import com.ruoyi.bst.order.domain.enums.OrderStatus;
import com.ruoyi.common.utils.MathUtils;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Map;

@Data
public class RevenueStatVO {

    @ApiModelProperty("订单用户数量")
    private Integer orderUserCount;
    @ApiModelProperty("订单总金额")
    private BigDecimal orderActualTotalAmount;
    @ApiModelProperty("订单实收金额")
    public BigDecimal getOrderActualAmount() {
        return MathUtils.subtractDecimal(orderActualTotalAmount, orderRefundAmount);
    }

    @ApiModelProperty("订单总数量")
    private Integer orderCount;
    @ApiModelProperty("订单退款金额")
    private BigDecimal orderRefundAmount;

    @ApiModelProperty("商铺数量")
    private Integer storeCount;

    @ApiModelProperty("设备数量")
    private Integer deviceCount;
    @ApiModelProperty("设备状态数量")
    private Map<String, Integer> deviceStatusMap;
    @ApiModelProperty("设备在线数量")
    private Map<String, Integer> deviceOnlineStatusMap;

    @ApiModelProperty("用户爆灯次数")
    private Integer userLightingNum;
    @ApiModelProperty("用户充值金额")
    private BigDecimal userRechargeAmount;
    @ApiModelProperty("用户退款金额")
    private BigDecimal userRefundAmount;
    @ApiModelProperty("用户消费金额")
    public BigDecimal getUserConsumeAmount() {
        return MathUtils.subtractDecimal(userRechargeAmount, userRefundAmount);
    }


}
