package com.jeesharp.business.modules.pay.payalipayconfig.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 支付宝配置记录状态枚举。
 *
 * @author jeesharp
 * @since 2026-05-25
 */
@Getter
@AllArgsConstructor
public enum PayAlipayConfigStatusEnum {

    DISABLED(0, "禁用"),
    ENABLED(1, "启用");

    private final Integer value;
    private final String desc;

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