package com.tzy.dto;

import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.math.RoundingMode;

/**
 * 天,本周,本月消费总额,单位元
 */
@Data
public class UserAmountDTO implements Serializable {
    private BigDecimal dailyAmount;
    private BigDecimal weekAmount;
    private BigDecimal monthAmount;

    public BigDecimal getDailyAmount() {
        return dailyAmount.divide(BigDecimal.valueOf(100), 2, RoundingMode.HALF_UP);
    }

    public BigDecimal getWeekAmount() {
        return weekAmount.divide(BigDecimal.valueOf(100), 2, RoundingMode.HALF_UP);
    }

    public BigDecimal getMonthAmount() {
        return monthAmount.divide(BigDecimal.valueOf(100), 2, RoundingMode.HALF_UP);
    }
}
