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

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

import java.util.Arrays;

@Getter
@AllArgsConstructor
public enum GenerateRecordStateEnums implements IntArrayValuable {
    GENERATING(0, "生成中"),
    TEXT_GENERATED(1, "已生成文字码，未生成图片码"),
    ALL_COMPLETED(2, "文字及图片码均生成"),
    ;

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

    /**
     * 码类型
     */
    private final Integer state;

    /**
     * 类型名
     */
    private final String stateName;

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

}
