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 OperateTypeEnum implements IntArrayValuable {

    BATCH(0, "批次上链"),
    BUSINESS_INFO(1, "商户信息上链"),
    GOODS_INFO(2, "商品信息上链"),
    LINK(3, "环节上链"),
    PUT_IN(4, "入库上链"),
    OUT_BOUND(5, "出库上链"),
    GOODS_VERIFY(6, "商品认证上链"),
    PLAN(7, "种植/养殖/畜牧计划上链"),
    JOB(8, "种植/养殖/畜牧作业上链"),
    JOB_INPUT(9, "作业投入品上链"),
    INPUT_BUY(10, "投入品采购上链"),
    ;

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

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

    private final String name;

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