package cn.stylefeng.team.generator.api.exception.enums;

import cn.stylefeng.roses.kernel.rule.constants.RuleConstants;
import cn.stylefeng.roses.kernel.rule.exception.AbstractExceptionEnum;
import cn.stylefeng.team.generator.api.constants.GenerationConstants;
import lombok.Getter;

@Getter
public enum ProjectGeneratorExceptionEnum implements AbstractExceptionEnum {

    PROJECT_ANALYSIS_ERROR(RuleConstants.BUSINESS_ERROR_TYPE_CODE + GenerationConstants.GENERATION_EXCEPTION_STEP_CODE + "41", "项目解析错误！"),

    PROJECT_DOWNLOAD_ERROR(RuleConstants.BUSINESS_ERROR_TYPE_CODE + GenerationConstants.GENERATION_EXCEPTION_STEP_CODE + "42", "项目下载错误！"),

    PROJECT_TEMPLATE_CANT_FIND(RuleConstants.BUSINESS_ERROR_TYPE_CODE + GenerationConstants.GENERATION_EXCEPTION_STEP_CODE + "41", "项目模板文件找不到，请检查项目模板文件是否存在！");

    private final String errorCode;

    private final String userTip;

    ProjectGeneratorExceptionEnum(String errorCode, String userTip) {
        this.errorCode = errorCode;
        this.userTip = userTip;
    }

}
