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

import lombok.AllArgsConstructor;
import lombok.Getter;

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

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

    private final Integer value;
    private final String desc;

    public static PayWechatConfigStatusEnum fromValue(Integer value) {
        if (value == null) {
            return null;
        }
        for (PayWechatConfigStatusEnum e : values()) {
            if (e.getValue().equals(value)) {
                return e;
            }
        }
        return null;
    }
}
