package top.continew.admin.business.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 平台子账号类型枚举
 *
 * @author jiay
 */
@Getter
@AllArgsConstructor
public enum ChargeTypeEnum {

    CHAT(0, "TOKEN"), IMAGE(1, "图"), AUDIO(3, "音频"), VIDEO(4, "视频"), D3D(5, "3D"), TEACHER_AGENT(6, "教学智能体"),
    DEEP_RESEARCH(7, "DEEP_RESEARCH"), MULTIMODAL(8, "多模态"), AI_CODE(9, "AI编程"), AGENT_DEVELOPMENT(10, "智能体开发")

    ;

    /**
     * 模型平台类型
     */
    private final Integer typeId;
    /**
     * 描述
     */
    private final String desc;

    public static String convertDesc(Long typeId) {
        ChargeTypeEnum[] values = ChargeTypeEnum.values();
        for (ChargeTypeEnum va : values) {
            if (va.getTypeId().equals(typeId)) {
                return va.getDesc();
            }
        }
        return "--";
    }

    public static Integer getType(Integer index) {
        ChargeTypeEnum[] values = ChargeTypeEnum.values();
        if (index != null && index >= 0 && index < values.length) {
            return values[index].getTypeId();
        }
        return -1;

    }

}
