package cn.iocoder.yudao.module.iot.enums;

import cn.iocoder.yudao.framework.common.exception.ErrorCode;

/**
 * Report 错误码枚举类
 *
 * report 系统，使用 1-003-000-000 段
 */
public interface ErrorCodeConstants {

    ErrorCode DEVICE_NOT_EXISTS = new ErrorCode(1_003_000_000, "设备不存在");
    ErrorCode DEVICE_REFERENCES_EXIST = new ErrorCode(1_003_000_000, "存在设备已被引用，请先删除引用。");
    ErrorCode DEVICE_MQTT_TOPIC_EXIST = new ErrorCode(1_003_000_000, "设备MQTT主题不存在。");
    ErrorCode DEVICE_MQTT_TOPIC_ALREADY_EXIST = new ErrorCode(1_003_000_000, "该MQTT主题已被其他设备订阅，一台设备只能绑定一个主题。");

    ErrorCode DEVICE_EXISTS = new ErrorCode(1_003_000_000, "同名或同主题设备已存在");


    ErrorCode FORMULA_NOT_EXISTS = new ErrorCode(1_003_000_000, "公式不存在");
    ErrorCode FORMULA_DETAIL_NOT_EXISTS = new ErrorCode(1_003_000_000, "公式明细不存在");
    ErrorCode GATEWAY_NOT_EXISTS = new ErrorCode(1_003_000_000, "网关不存在");
    ErrorCode KANBAN_NOT_EXISTS = new ErrorCode(1_003_000_000, "看板不存在");
    ErrorCode ORGANIZATION_EXITS_CHILDREN = new ErrorCode(1_003_000_000, "GoView 项目不存在");
    ErrorCode ORGANIZATION_NOT_EXISTS = new ErrorCode(1_003_000_000, "GoView 项目不存在");
    ErrorCode ORGANIZATION_PARENT_ERROR = new ErrorCode(1_003_000_000, "GoView 项目不存在");
    ErrorCode ORGANIZATION_PARENT_NOT_EXITS = new ErrorCode(1_003_000_000, "GoView 项目不存在");
    ErrorCode ORGANIZATION_PARENT_IS_CHILD = new ErrorCode(1_003_000_000, "GoView 项目不存在");
    ErrorCode ORGANIZATION_NAME_DUPLICATE = new ErrorCode(1_003_000_000, "GoView 项目不存在");
    ErrorCode FORMULA_RECORD_NOT_EXISTS = new ErrorCode(1_003_000_000, "GoView 项目不存在");
    ErrorCode MQTT_RECORD_NOT_EXISTS = new ErrorCode(1_003_000_000, "GoView 项目不存在");
    ErrorCode FRPC_PROXY_SERVER_NOT_EXISTS = new ErrorCode(1_003_000_000, "GoView 项目不存在");
    ErrorCode FRPS_SERVER_NOT_EXISTS = new ErrorCode(1_003_000_000, "GoView 项目不存在");
    ErrorCode FEEDBACK_NOT_EXISTS = new ErrorCode(1_003_000_001, "用户反馈不存在");
    ErrorCode MQTT_DATA_RECORD_NOT_EXISTS = new ErrorCode(1_003_000_003, "设备数据记录不存在");

    ErrorCode ALERT_NOT_EXISTS = new ErrorCode(1_003_000_003, "告警配置不存在");
    ErrorCode ALERT_RECORD_NOT_EXISTS = new ErrorCode(1_003_000_003, "告警记录不存在");

    //======================================数据采集相关=================================================
    ErrorCode DEVICE_MODEL_NOT_EXISTS = new ErrorCode(1_003_000_001, "采集设备模型不存在");
    ErrorCode DEVICE_MODEL_CODE_EXISTS = new ErrorCode(1_003_000_002, "采集设备模型编码已存在");
    ErrorCode DEVICE_CODE_ALREADY_EXISTS = new ErrorCode(1_003_000_002, "采集设备编码已存在");

    ErrorCode DEVICE_ID_MODEL_NOT_EXISTS = new ErrorCode(1_003_000_003, "该设备模型ID不能为空");
    ErrorCode POINT_ID_MODEL_NOT_EXISTS = new ErrorCode(1_003_000_004, "该点位参数ID不能为空");
    ErrorCode DEVICE_MODEL_ATTRIBUTE_NOT_EXISTS = new ErrorCode(1_003_000_005, "采集设备模型点位不存在");
    ErrorCode DEVICE_MODEL_POINT_CODE_EXISTS = new ErrorCode(1_003_000_005, "采集设备采集点位编码已存在");

    ErrorCode DEVICE_MODEL_ATTRIBUTE_POTIN_CODE_EXISTS = new ErrorCode(1_003_000_005, "采集设备模型点位编码已存在");

    ErrorCode DEVICE_ATTRIBUTE_NOT_EXISTS = new ErrorCode(1_003_000_006, "设备属性不存在");
    ErrorCode DEVICE_ATTRIBUTE_TYPE_NOT_EXISTS = new ErrorCode(1_003_000_007, "采集点分类不存在");
    ErrorCode DEVICE_CODE_EXISTS = new ErrorCode(1_003_000_000, "采集点编码已存在");
    ErrorCode DEVICE_ATTRIBUTE_TYPE_REFERENCES_EXISTS = new ErrorCode(1_003_000_008, "存在采集点类型已被引用，请先删除对应引用");
    ErrorCode ENDPOINT_DOES_NOT_EXIS = new ErrorCode(1_003_000_009, "暂未设置设备端点");
    ErrorCode DEVICE_DOES_NOT_EXIST= new ErrorCode(1_003_000_010, "该采集设备不存在");
    ErrorCode DEVICE_ID_DOES_NOT_EXIST= new ErrorCode(1_003_000_011, "该设备ID不能为空");
    ErrorCode OPC_USERNAME_DOES_NOT_EXIST= new ErrorCode(1_003_000_012, "OPC连接账号不能为空");
    ErrorCode OPC_PASSWORD_DOES_NOT_EXIST= new ErrorCode(1_003_000_013, "OPC连接账号不能为空");
    ErrorCode OPC_CONNECT_FAILURE_DOES_NOT_EXIST= new ErrorCode(1_003_000_014, "OPC连接失败,请检测url及账号密码是否正确");
    ErrorCode OPC_CLOSE_CONNECT_FAILURE= new ErrorCode(1_003_000_015, "OPC断开连接失败");
    ErrorCode OPC_PARAMETER_DOES_NOT_EXIST= new ErrorCode(1_003_000_016, "连接关闭参数不存在");

    // ======================================= 点位规则  ============================================
    ErrorCode DEVICE_POINT_RULES_NOT_EXISTS = new ErrorCode(1_004_000_001, "点位规则不存在");
    ErrorCode DEVICE_MODEL_RULES_NOT_EXISTS = new ErrorCode(1_004_000_002, "点位规则关联模型不存在");
    ErrorCode DEVICE_OPERATION_RECORD_NOT_EXISTS = new ErrorCode(1_004_000_003, "运行记录不存在");
    ErrorCode DEVICE_WARINNING_RECORD_NOT_EXISTS = new ErrorCode(1_004_000_004, "告警记录不存在");
    // ======================================= 配方  ============================================
    ErrorCode RECIPE_NOT_EXISTS = new ErrorCode(1_003_000_000, "配方主不存在");
    ErrorCode RECIPE_TYPE_NOT_EXISTS = new ErrorCode(1_003_000_000, "配方类型表（基础字典）不存在");
    ErrorCode RECIPE_POINT_NOT_EXISTS = new ErrorCode(1_003_000_000, "手动配置参数表（绑定配方）不存在");
    ErrorCode RECIPE_DEVICE_ATTRIBUTE_NOT_EXISTS = new ErrorCode(1_003_000_000, "配方配置（关联采集设备模型-点位管理）不存在");

    ErrorCode RECIPE_CODE_DUPLICATE = new ErrorCode(1_003_000_004, "编码已存在");
    ErrorCode RECIPE_CODE_EMPTY = new ErrorCode(1_003_000_005, "配方编码不能为空");
    ErrorCode RECIPE_PLAN_DETAIL_NOT_EXISTS = new ErrorCode(1_003_000_006, "配方计划详情表（配方库）不存在");
    ErrorCode RECIPE_PLAN_DETAIL_CODE_EXISTS = new ErrorCode(1_003_000_006, "编码已存在");
    ErrorCode RECIPE_POINT_RECORD_NOT_EXISTS = new ErrorCode(1_003_000_007, "IoT配方点位记录不存在");
    ErrorCode RECIPE_DEVICE_RECORD_NOT_EXISTS = new ErrorCode(1_003_000_008, "设备点位采集值记录不存在");

    // ======================================= Tdengine ============================================

    ErrorCode TABLE_CREATION_FAILED = new ErrorCode(1_004_000_008, "TDengine 表创建失败");
    ErrorCode COLOUMN_CREATION_FAILED = new ErrorCode(1_004_000_008, "TDengine 列创建失败");


}
