package com.flossom.common.core.enums;

import java.util.Arrays;

/**
 * 积分操作类型
 *
 * @author flossom
 */
public enum IntegralChangeTypeEnum {
    INCREASE("1", "增加"), REDUCE("2", "减少");

    private final String code;
    private final String info;

    IntegralChangeTypeEnum(String code, String info) {
        this.code = code;
        this.info = info;
    }

    public String getCode() {
        return code;
    }

    public String getInfo() {
        return info;
    }

    public static Boolean isIntegralChangType(String code) {
        for (IntegralChangeTypeEnum typeEnum : IntegralChangeTypeEnum.values()) {
            if (typeEnum.getCode().equals(code)) {
                return true;
            }
        }
        return false;
    }
}
