package com.jeesharp.business.modules.mall.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 到店自提点启用状态，与 {@code mall_pickup_point.status} 存储值一致。
 *
 * @author jeesharp
 * @since 2026-05-16
 */
@Getter
@AllArgsConstructor
public enum MallPickupPointStatusEnum {

    /** 禁用 */
    DISABLED(0, "禁用"),

    /** 启用 */
    ENABLED(1, "启用");

    private final Integer value;
    private final String desc;

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