package cn.iocoder.yudao.framework.common.enums;

import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 * 上链状态
 */
@Getter
@AllArgsConstructor
public enum BlockStateEnum implements IntArrayValuable {

    NOT_ON_CHAIN(0, "未上链"),
    ACTIVATION(1, "已激活"),
    FREEZE(2, "冻结");

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

    /**
     * 上链状态
     */
    private final Integer blockState;

    /**
     * 状态名
     */
    private final String stateName;

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