package com.lesingle.creation.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * AI3D 生成类型枚举
 */
@Getter
@AllArgsConstructor
public enum AI3DGenerateTypeEnum {

    NORMAL("Normal", "带纹理"),
    GEOMETRY("Geometry", "白模"),
    LOW_POLY("LowPoly", "低多边形"),
    SKETCH("Sketch", "草图");

    private final String code;
    private final String desc;

    public static AI3DGenerateTypeEnum getByCode(String code) {
        if (code == null) {
            return NORMAL;
        }
        for (AI3DGenerateTypeEnum type : values()) {
            if (type.getCode().equals(code)) {
                return type;
            }
        }
        return NORMAL;
    }
}
