package com.ai.da.common.enums;


import lombok.Getter;

import java.util.stream.Stream;

@Getter
public enum MotionModeEnum {
    POSE_TO_VIDEO(1, "/api/comfyui_image_pose_2_video"),

    PROMPT_TO_VIDEO(2, "/api/comfyui_image_2_video"),

    FIRST_LAST_FRAME_TO_VIDEO(3, "/api/comfyui_flf_2_video")
    ;

    private int code;

    private String url;

    MotionModeEnum(int code, String url) {
        this.code = code;
        this.url = url;
    }

    public static MotionModeEnum of(int code) {
        return Stream.of(MotionModeEnum.values()).filter(v -> v.getCode()== code).findFirst().orElse(null);
    }
}
