package com.ruoyi.xq.enums.account;

import lombok.Getter;

import java.util.Arrays;

@Getter
public enum WxTransLogCateEnum {
    CONSUMER(1,"交换积分"),
    VIP_GIVE(2,"开通vip赠送"),
    ORDER(3,"购买"),
    SYSTEM(4,"系统调账"),

    ;
    private final Integer code;
    private final String text;

    WxTransLogCateEnum(Integer code, String text) {
        this.code = code;
        this.text = text;
    }

    public static WxTransLogCateEnum getByCode(Integer code){
        return Arrays.stream(WxTransLogCateEnum.values()).filter(i -> i.getCode().equals(code)).findFirst().orElse(null);
    }
}
