package com.sonic.lion.domain.resp;

import com.sonic.lion.enums.I18nResources;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.text.MessageFormat;

@Data
public class ChargeMonthReward {

    @ApiModelProperty("当月累计充值金额buff")
    private Long totalAmount;

    @ApiModelProperty("要领取奖品最少要达到多少BUFF")
    private Long minBuff;

    @ApiModelProperty("是否已经领取")
    private Boolean receive;

    @ApiModelProperty("奖品档位Id")
    private Long rewardId;

    @ApiModelProperty("赠送多少ev")
    private Integer ev;

    @ApiModelProperty("赠送多少优惠券")
    private Long coupon;

    @ApiModelProperty("优惠券数量")
    private Long couponCount;

    @ApiModelProperty("优惠券描述")
    private String couponDesc;


    public String getCouponDesc() {
        if(couponCount.equals(1L)){
            return MessageFormat.format( I18nResources.CARD_NAME_CONTENT.getI18n(),"1");
        }
        return MessageFormat.format( I18nResources.CARD_NAME_CONTENT.getI18n(),coupon.toString()) + " × " + couponCount;
    }

}
