package com.sckw.payment.model.constant;

import java.util.Objects;

/**
 * 钱包操作
 *
 * @author xucaiqin
 * @date 2023-07-11 12:00:52
 */
public enum WalletActionEnum {
    CHARGING(1, "充值中", "1"),
    CASHING(2, "提现中", "2"),
    TRANSFERRING(3, "转帐中", "3"),
    REFUNDING(4, "退款中", "4"),
    ;
    private final int status;
    private final String desc;
    private final String label;

    WalletActionEnum(int status, String desc, String label) {
        this.status = status;
        this.label = label;
        this.desc = desc;
    }

    public static String getDesc(Integer status) {
        if (Objects.isNull(status)) {
            return "";
        }
        for (WalletActionEnum value : values()) {
            if (status == value.getStatus()) {
                return value.getDesc();
            }
        }
        return "";
    }

    public String getLabel() {
        return label;
    }

    public int getStatus() {
        return status;
    }


    public String getDesc() {
        return desc;
    }

}
