package com.ai.da.common.enums;

import lombok.Getter;

import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

@Getter
public enum GenerateModeEnum {

    /**
     * 通过文本生成
     */
    TEXT(1, "text","txt2img"),

    /**
     * 通过图片生成
     */
    IMAGE(2, "image", "img2img"),

    /**
     * 通过文本和图片生成
     */
    TEXT_IMAGE(2, "text-image","img2img");

    private Integer code;
    private String value;
    private String type;

    GenerateModeEnum(int code, String value) {
        this.code = code;
        this.value = value;
    }

    GenerateModeEnum(Integer code, String value, String type) {
        this.code = code;
        this.value = value;
        this.type = type;
    }

    public static List<String> getGenerateModeList(){
        return Stream.of(TEXT,IMAGE,TEXT_IMAGE).map(GenerateModeEnum::getValue).collect(Collectors.toList());
    }
}
