package com.ruoyi.dashboard.domain.platformIncomeDaily;

import com.ruoyi.common.utils.MathUtils;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;

@Data
public class PlatformDailyIncomeVO {
    
    @ApiModelProperty("日期")
    private LocalDate date;

    @ApiModelProperty("分成金额")
    private BigDecimal bonusAmount;

    @ApiModelProperty("分成退款金额")
    private BigDecimal bonusRefundAmount;

    @ApiModelProperty("分成实收")
    public BigDecimal getBonusActualAmount() {
        return MathUtils.subtractDecimal(bonusAmount, bonusRefundAmount);
    }

    @ApiModelProperty("提现服务费")
    private BigDecimal withdrawServiceCharge;

    @ApiModelProperty("总收益")
    public BigDecimal getTotalIncome() {
        return MathUtils.addDecimal(getBonusActualAmount(), withdrawServiceCharge);
    }

}
