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

import com.jeesharp.business.modules.common.enums.support.EnumValueSupport;
import com.jeesharp.business.modules.common.enums.support.IntValueEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 通用上下架状态（整型存库：0 下线，1 上架），供各业态商品/场馆/内容复用。
 *
 * @author jeesharp
 * @since 2026-07-03
 */
@Getter
@AllArgsConstructor
public enum ShelfStatusEnum implements IntValueEnum {

    OFFLINE(0, "下线"),
    ONLINE(1, "上架");

    private final Integer value;
    private final String desc;

    public static ShelfStatusEnum fromValue(Integer value) {
        return EnumValueSupport.fromIntValue(ShelfStatusEnum.class, value);
    }

    public static String getDescByValue(Integer value) {
        return EnumValueSupport.descByIntValue(ShelfStatusEnum.class, value);
    }
}
