package com.sonic.lion.domain.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;

/**
 * @author: code
 * @date: 2025/05/11
 * @Description:
 * @version: 1.0.0
 */
public enum FreezeType {

    WITHDRAW(1, "提现"),

    REFUND(2, "退款"),

    TRADE(3, "交易"),

    ACCOUNT(4, "帐户冻结"),

    TRANSFER(5, "转账"),

    RISK_CONTROL(10, "风控"),

    ABNORMAL(11, "异常"),

    OTHERS(12, "其他");

    private final int value;

    private final String desc;

    FreezeType(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public int getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public static FreezeType get(int value) {
        for (FreezeType freezeType : values()) {
            if (freezeType.getValue() == value) {
                return freezeType;
            }
        }
        return null;
    }
}
