package cn.iocoder.yudao.module.chain.enums;

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

import java.util.Arrays;

@Getter
@AllArgsConstructor
public enum ChainStateEnum implements IntArrayValuable {

    NOT_ON_CHAIN(0, "未上链"),
    ON_CHAIN(1, "已上链");

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

    /**
     * 操作类型
     */
    private final Integer state;

    private final String name;

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

}
