package com.sckw.payment.model.constant;

import java.util.Objects;

/**
 * 物流、贸易
 * 对账单状态枚举
 *
 * @author xucaiqin
 * @date 2023-07-11 12:00:52
 */
public enum CashEnum {
    ALL(-1, "全部", "all"),
    FAIL(0, "提现失败", "failed"),
    SUCCESS(1, "提现成功", "success"),
    LOAD(2, "提现中", "processing"),
    WAIT(3, "等待提现", "3");

    private final int status;
    private final String desc;
    private final String label;

    CashEnum(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 (CashEnum 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;
    }

}
