package com.ruoyi.cai.pay;


import lombok.Getter;

@Getter
public enum RechargeTypeEnum {

    COIN(1,"余额调整"),
    COIN_INCOME(2,"收益调整"),
    ;
    private final Integer code;
    private final String name;

    RechargeTypeEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public static RechargeTypeEnum getByCode(Integer code){
        RechargeTypeEnum[] values = RechargeTypeEnum.values();
        for (RechargeTypeEnum value : values) {
            if(value.getCode().equals(code)){
                return value;
            }
        }
        return null;
    }
}
