package com.webchat.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * @author 程序员七七， https://www.coderutil.com网站作者
 * @date 2024/11/9 03:53
 */
@Getter
@NoArgsConstructor
@AllArgsConstructor
public enum WalletTransEventEnum {

    SYSTEM_GRANT(1, WalletTransTypeEnum.INCOME, "系统发放"),

    SEND_PACKET(2, WalletTransTypeEnum.EXPENSES, "发红包"),

    RECEIVE_PACKET(3, WalletTransTypeEnum.INCOME, "收红包"),

    JOIN_LOTTERY(4, WalletTransTypeEnum.EXPENSES, "参与抽奖"),

    ;

    private Integer transEvent;

    private WalletTransTypeEnum transType;

    private String transEventName;


    public static String getEventName(Integer transEvent) {
        for (WalletTransEventEnum event : WalletTransEventEnum.values()) {
            if (event.transEvent.equals(transEvent)) {
                return event.transEventName;
            }
        }
        return "未知";
    }
}
