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

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 支付商户开启状态枚举。
 *
 * @author jeesharp
 * @since 2026-05-25
 */
@Getter
@AllArgsConstructor
public enum PayMerchantStatusEnum {

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

    private final Integer value;
    private final String desc;

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