package com.yonge.cooleshow.biz.dal.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.yonge.toolset.base.enums.BaseEnum;

public enum FeatureType implements BaseEnum<String, FeatureType> {
    CLOUD_STUDY_TRAIN("小酷Ai训练"),
    CLOUD_STUDY_EVALUATION("小酷Ai评测"),
    FOLLOW_UP_TRAINING( "跟练");

    @EnumValue
    private String code;

    private String desc;

    FeatureType(String desc) {
        this.code = this.name();
        this.desc = desc;
    }

    @Override
    public String getCode() {
        return this.code;
    }

    public String getDesc() {
        return this.desc;
    }

    public static FeatureType format(String feature) {
        switch (feature){

//            UNIT_TEST("单元测试"),
//                PRACTICE("自主练习"),
//                EVALUATION("评测"),
//                LESSON_TRAINING("课后练习"),
//                FOLLOW_UP_TRAINING("跟练"),
            case "PRACTICE":
                return CLOUD_STUDY_TRAIN;
            case "FOLLOW_UP_TRAINING":
                return FOLLOW_UP_TRAINING;
            case "EVALUATION":
                return CLOUD_STUDY_EVALUATION;
            default:
                return CLOUD_STUDY_TRAIN;
        }

    }

    public String toCbs() {
        switch (this) {
            case CLOUD_STUDY_TRAIN:
                return "PRACTICE";
            case FOLLOW_UP_TRAINING:
                return "FOLLOW_UP_TRAINING";
            case CLOUD_STUDY_EVALUATION:
                return "EVALUATION";
            default:
                return "PRACTICE";
        }
    }
}
