diff --git a/include/iot.hrl b/include/iot.hrl index ac02e04..d307db7 100644 --- a/include/iot.hrl +++ b/include/iot.hrl @@ -22,52 +22,3 @@ -define(TASK_STATUS_INIT, -1). %% 未接入 -define(TASK_STATUS_FAILED, 0). %% 离线 -define(TASK_STATUS_OK, 1). %% 在线 - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%% 二级分类定义 -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%% 缓存数据库表 --record(kv, { - key :: binary(), - val :: binary() | list() | map() | sets:set(), - expire_at = 0 :: integer(), - type :: atom() -}). - -%% id生成器 --record(id_generator, { - tab :: atom(), - increment_id = 0 :: integer() -}). - -%% 统计项 --record(option, { - success_num = 0, - fail_num = 0 -}). - -%% 北向数据 --record(north_data, { - id = 0 :: integer(), - location_code :: binary(), - %% 数据库类型的endpoint, 可以返回list: [{K, V}, {K1, V1}] - fields :: [{K :: binary(), V :: any()}], - timestamp = 0 :: integer() -}). - -%% 事件相关的数据 --record(event_data, { - id = 0 :: integer(), - location_code :: binary(), - event_type :: integer(), - params :: map() -}). - -%% 发送数据 --record(post_data, { - id = 0 :: integer(), - location_code :: binary(), - %% 数据库类型的endpoint, 可以返回list: [{K, V}, {K1, V1}] - body :: binary() | list() -}). \ No newline at end of file diff --git a/include/iot_tables.hrl b/include/iot_tables.hrl deleted file mode 100644 index 7eebc7c..0000000 --- a/include/iot_tables.hrl +++ /dev/null @@ -1,23 +0,0 @@ -%%%------------------------------------------------------------------- -%%% @author anlicheng -%%% @copyright (C) 2025, -%%% @doc -%%% -%%% @end -%%% Created : 08. 5月 2025 12:08 -%%%------------------------------------------------------------------- --author("anlicheng"). - -%% 用来保存微服务的配置 --record(service_config, { - service_id :: binary(), - host_uuid :: binary(), - config_json = <<>> :: binary(), - %% 保持上一个版本的内容,错误时回滚 - last_config_json = <<>> :: binary(), - %% 最后一次修改的用户id - last_edit_user :: integer(), - %% 状态: 0: 停止, 1: 运行中 - update_ts = 0, - create_ts = 0 -}). \ No newline at end of file