iot/apps/iot/include/iot.hrl
安礼成 3a48345202 fix
2023-02-14 20:31:29 +08:00

57 lines
1.1 KiB
Erlang

%%%-------------------------------------------------------------------
%%% @author licheng5
%%% @copyright (C) 2023, <COMPANY>
%%% @doc
%%%
%%% @end
%%% Created : 14. 2月 2023 19:48
%%%-------------------------------------------------------------------
-author("licheng5").
%% 状态定义
-define(STATUS_INACTIVE, 0).
-define(STATUS_ONLINE, 1).
-define(STATUS_OFFLINE, 2).
-define(STATUS_DELETE, 3).
%% 主机定义
-record(host, {
id :: binary(),
name :: binary(),
model :: binary(),
cell_id :: integer(),
terminal_num = 0 :: integer(),
update_ts = 0 :: integer(),
status = 0 :: integer()
}).
%% 终端
-record(terminal, {
id :: binary(),
name :: binary(),
product_id :: integer(),
vendor_id :: integer(),
model :: binary(),
cell_id :: integer(),
host_id :: binary(),
update_ts = 0 :: integer(),
status = 0 :: integer()
}).
%% 单元
-record(cell, {
id :: integer(),
name :: binary()
}).
%% 产品
-record(product, {
id :: integer(),
name :: binary()
}).
%% 厂商
-record(vendor, {
id :: integer(),
name :: binary()
}).