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

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

@Getter
public enum ProjectExceptionEnum implements AbstractExceptionEnum {

    CANT_FIND_PROJECT(RuleConstants.BUSINESS_ERROR_TYPE_CODE + ProjectConstants.PROJECT_EXCEPTION_STEP_CODE + "01", "查询不到对应项目管理，具体信息：{}"),

    SELECT_PROJECT(RuleConstants.BUSINESS_ERROR_TYPE_CODE + ProjectConstants.PROJECT_EXCEPTION_STEP_CODE + "02", "请先选择项目再进行业务操作"),

    CANT_FIND_LOGIN_USER(RuleConstants.BUSINESS_ERROR_TYPE_CODE + ProjectConstants.PROJECT_EXCEPTION_STEP_CODE + "03", "无法获取到当前登录用户"),

    PROJECT_NOT_EXISTED(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE + "10004", "查询结果不存在"),

    DEVOPS_SYSTEM_CODE_TYPE_ERROR(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE + "10005", "查询不到系统编码类别，请检查系统编码类别参数是否正确"),

    DEVOPS_SYSTEM_CODE_ERROR(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE + "10006", "系统编码已存在，请重新生成系统编码"),

    DEVOPS_PROJECT_CODE_ERROR(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE + "10007", "项目编码重复"),

    DEVOPS_PROJECT_NAME_ERROR(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE + "10008", "项目名称重复"),

    SYS_CODE_ERROR(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE + "10009", "系统编码值错误，请检查系统编码是否生成正确"),

    USER_AUTH_ERROR(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE + "10010", "用户没有该项目的权限"),

    USER_MEMBER_ERROR(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE + "10011", "获取不到会员，请检查会员状态"),

    USER_MEMBER_CANT_GEN_PROJECT(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE + "10012", "非系统会员，无法生成项目"),

    USER_MEMBER_CANT_GEN_CODE(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE + "10013", "非系统会员，无法生成代码");

    private final String errorCode;

    private final String userTip;

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

}
