package com.sonic.frog.enums;

import lombok.Getter;

/**
 * 签到金币枚举
 */
@Getter
public enum SignInCoinNumEnum {

    DAY_1(1, 500),
    DAY_2(2, 500),
    DAY_3(3, 500),
    DAY_4(4, 500),
    DAY_5(5, 500),
    DAY_6(6, 500),
    DAY_7(7, 500);

    /**
     * 第几天
     */
    private final Integer dayNum;
    /**
     * 奖励金币的数量
     */
    private final Integer coinNum;

    SignInCoinNumEnum(Integer dayNum, Integer coinNum) {
        this.dayNum = dayNum;
        this.coinNum = coinNum;
    }

    public static Integer getCoinNum(Integer dayNum) {
        for (SignInCoinNumEnum value : SignInCoinNumEnum.values()) {
            if (value.dayNum.equals(dayNum)) {
                return value.coinNum;
            }
        }
        return 0;
    }
}
