package com.jeesharp.business.modules.finance.payorder.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 支付单异步回调状态（与 legacy sys_pay_order.notify_status 编码对齐）。
 *
 * @author jeesharp
 * @since 2026-05-25
 */
@Getter
@AllArgsConstructor
public enum FinancePayNotifyStatusEnum {

    WAIT_NOTIFY("0", "未回调"),
    NOTIFY_OK("1", "已回调");

    private final String value;
    private final String desc;

    public static String getDescByValue(String value) {
        if (value == null) {
            return "";
        }
        for (FinancePayNotifyStatusEnum e : values()) {
            if (e.getValue().equals(value)) {
                return e.getDesc();
            }
        }
        return "";
    }
}
