package com.cf.imes.module.report.enums;


import com.cf.imes.framework.common.exception.ErrorCode;

/**
 * Report 错误码枚举类
 * <p>
 * report 系统，使用 1-004-000-000 段
 */
public final class ErrorCodeConstants {

    // ========== UREPORT template模块 1-003-001-000 ==========
    public static final ErrorCode TEMPLATE_NOT_EXISTS = new ErrorCode(1_004_001_001, "报表模板信息不存在");
    public static final ErrorCode TEMPLATE_BUILDIN_OPERATION_PERMISSION_ERROR = new ErrorCode(1_004_001_002, "内置模板操作权限不足");
    public static final ErrorCode TEMPLATE_NAME_UNIQE_ERROR = new ErrorCode(1_004_001_003, "模板名【{}】已存在，请编辑模板名后重试");
    public static final ErrorCode TEMPLATE_PREIVEW_QUERYPARAM_EMPTY = new ErrorCode(1_004_001_004, "查询参数不能为空：{}");
    public static final ErrorCode TEMPLATE_IMPORT_CONTENT_EMPTY_ERROR = new ErrorCode(1_004_001_005, "导入模板内容不能为空，请检查");
    public static final ErrorCode TEMPLATE_PREVIEW_TEMPLATE_CONTENT_EMPTY_ERROR = new ErrorCode(1_004_001_006, "报表模板内容为空，请检查");

    // ========== UREPORT datasource模块 1-003-002-000 ==========
    public static final ErrorCode DATASOURCE_NOT_EXISTS = new ErrorCode(1_004_002_001, "报表数据源不存在");
    public static final ErrorCode DATASOURCE_CONNECT_FAIL = new ErrorCode(1_004_002_002, "报表数据源连接失败");
    public static final ErrorCode DATASOURCE_SPRINGBEAN_GET_FAIL = new ErrorCode(1_004_002_003, "无法获取springbean【{}】");
    public static final ErrorCode DATASOURCE_SPRINGBEAN_METHODS_GET_FAIL = new ErrorCode(1_004_002_004, "获取springbean方法列表失败，请检查】");
    public static final ErrorCode DATASOURCE_BUILDIN_OPERATION_PERMISSION_ERROR = new ErrorCode(1_004_002_005, "内置数据源操作权限不足");


    // ========== UREPORT dataset模块 1-003-003-000 ==========
    public static final ErrorCode DATASET_NOT_EXISTS = new ErrorCode(1_004_003_001, "报表数据集不存在或权限不足");
    public static final ErrorCode DATASET_SQL_INJECTION_RISK = new ErrorCode(1_004_003_002, "存在SQL注入风险");
    public static final ErrorCode DATASET_SQL_REQUIRED = new ErrorCode(1_004_003_003, "SQL语句不能为空");
    public static final ErrorCode DATASET_GET_FIELDS_ERROR = new ErrorCode(1_004_003_004, "获取表字段异常");
}
