package cn.newfeifan.mall.module.product.enums.spu;

import cn.newfeifan.mall.framework.common.core.IntArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 * 商品 SPU 状态
 *
 * @author 非繁源码
 */
@Getter
@AllArgsConstructor
public enum SpuTypeStatusEnum implements IntArrayValuable {

    VIRTUAL_SPU(1, "虚拟商品"),
    REAL_SPU(2, "实体商品");

    public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(SpuTypeStatusEnum::getStatus).toArray();

    /**
     * 状态
     */
    private final Integer status;
    /**
     * 状态名
     */
    private final String name;

    @Override
    public int[] array() {
        return ARRAYS;
    }


}
