|
@@ -38,7 +38,7 @@ create table iot_device_group
|
|
|
large_type tinyint unsigned not null default 0 comment '[有点晕?]1-12(车辆、装载机、矿卡、人员、水表、电表、边坡监控、视频监控、皮带称重、环境监测、无人地磅、排放监测)',
|
|
large_type tinyint unsigned not null default 0 comment '[有点晕?]1-12(车辆、装载机、矿卡、人员、水表、电表、边坡监控、视频监控、皮带称重、环境监测、无人地磅、排放监测)',
|
|
|
del_flag tinyint not null default 0 comment '0-未删除,1-删除',
|
|
del_flag tinyint not null default 0 comment '0-未删除,1-删除',
|
|
|
create_time datetime not null default CURRENT_TIMESTAMP comment '创建时间',
|
|
create_time datetime not null default CURRENT_TIMESTAMP comment '创建时间',
|
|
|
- update_time datetime not null default current_timestamp on update CURRENT_TIMESTAMP comment '更新时间',
|
|
|
|
|
|
|
+ update_time datetime not null default current_timestamp on update CURRENT_TIMESTAMP comment '更新时间',
|
|
|
create_user varchar(255) not null default '' comment '创建人',
|
|
create_user varchar(255) not null default '' comment '创建人',
|
|
|
update_user varchar(255) not null default '' comment '更新人'
|
|
update_user varchar(255) not null default '' comment '更新人'
|
|
|
) comment '设备分组表';
|
|
) comment '设备分组表';
|
|
@@ -89,7 +89,7 @@ create table iot_device_error
|
|
|
guid varchar(255) not null default '' comment '唯一标识[暂时保留]',
|
|
guid varchar(255) not null default '' comment '唯一标识[暂时保留]',
|
|
|
error_reason text null comment '设备异常原因',
|
|
error_reason text null comment '设备异常原因',
|
|
|
create_time datetime not null default current_timestamp comment '创建时间',
|
|
create_time datetime not null default current_timestamp comment '创建时间',
|
|
|
- update_time datetime not null default current_timestamp on update CURRENT_TIMESTAMP comment '更新时间',
|
|
|
|
|
|
|
+ update_time datetime not null default current_timestamp on update CURRENT_TIMESTAMP comment '更新时间'
|
|
|
|
|
|
|
|
)comment '设备异常记录表';
|
|
)comment '设备异常记录表';
|
|
|
|
|
|
|
@@ -100,18 +100,19 @@ create table iot_mod_error
|
|
|
mod_code varchar(255) not null default '' comment '物理模型编号',
|
|
mod_code varchar(255) not null default '' comment '物理模型编号',
|
|
|
error_reason text null comment '设备异常原因',
|
|
error_reason text null comment '设备异常原因',
|
|
|
create_time datetime not null default current_timestamp comment '创建时间',
|
|
create_time datetime not null default current_timestamp comment '创建时间',
|
|
|
- update_time datetime not null default current_timestamp on update CURRENT_TIMESTAMP comment '更新时间',
|
|
|
|
|
|
|
+ update_time datetime not null default current_timestamp on update CURRENT_TIMESTAMP comment '更新时间'
|
|
|
)comment '物理模型设备异常记录表';
|
|
)comment '物理模型设备异常记录表';
|
|
|
|
|
|
|
|
create table time_Series_database_mapping
|
|
create table time_Series_database_mapping
|
|
|
(
|
|
(
|
|
|
id bigint unsigned auto_increment
|
|
id bigint unsigned auto_increment
|
|
|
primary key,
|
|
primary key,
|
|
|
|
|
+ tenant_id varchar(255) not null default '' comment '租户id',
|
|
|
time_Series_table_name varchar(255) not null default '' comment '时序数据库子表名称',
|
|
time_Series_table_name varchar(255) not null default '' comment '时序数据库子表名称',
|
|
|
time_Series_super_name varchar(255) not null default '' comment '时序数据库超级表名称',
|
|
time_Series_super_name varchar(255) not null default '' comment '时序数据库超级表名称',
|
|
|
guid varchar(255) not null default '' comment 'guid',
|
|
guid varchar(255) not null default '' comment 'guid',
|
|
|
create_time datetime not null default current_timestamp comment '创建时间',
|
|
create_time datetime not null default current_timestamp comment '创建时间',
|
|
|
- update_time datetime not null default current_timestamp on update CURRENT_TIMESTAMP comment '更新时间',
|
|
|
|
|
|
|
+ update_time datetime not null default current_timestamp on update CURRENT_TIMESTAMP comment '更新时间'
|
|
|
)comment '时序数据库和关系型数据库映射表';
|
|
)comment '时序数据库和关系型数据库映射表';
|
|
|
|
|
|
|
|
-- create table iot_device_history
|
|
-- create table iot_device_history
|