|
|
|
@ -2018,6 +2018,53 @@ COMMENT ON COLUMN "public"."filter_rule"."updater" IS '更新人'; |
|
|
|
COMMENT ON COLUMN "public"."filter_rule"."update_date" IS '更新时间'; |
|
|
|
COMMENT ON TABLE "public"."filter_rule" IS '过滤规则表'; |
|
|
|
|
|
|
|
-- ---------------------------- |
|
|
|
-- Table structure for filter_rule_detail |
|
|
|
-- ---------------------------- |
|
|
|
create table if not exists public.filter_rule_detail |
|
|
|
( |
|
|
|
id bigint primary key, |
|
|
|
filter_rule_id bigint not null, |
|
|
|
thing_name varchar(100), |
|
|
|
thing_code varchar(100) not null, |
|
|
|
attr_name varchar(100), |
|
|
|
attr_code varchar(100) not null, |
|
|
|
attr_alias varchar(10), |
|
|
|
data_type integer, |
|
|
|
agg_type varchar(10), |
|
|
|
agg_interval integer, |
|
|
|
timeunit varchar(20), |
|
|
|
tenant_code bigint not null, |
|
|
|
company_id bigint, |
|
|
|
dept_id bigint, |
|
|
|
creator bigint, |
|
|
|
create_date bigint, |
|
|
|
updater bigint, |
|
|
|
update_date bigint |
|
|
|
); |
|
|
|
|
|
|
|
comment on table public.filter_rule_detail is '过滤规则详情表'; |
|
|
|
comment on column public.filter_rule_detail.id is '主键'; |
|
|
|
comment on column public.filter_rule_detail.filter_rule_id is '过滤规则id'; |
|
|
|
comment on column public.filter_rule_detail.thing_name is '物名称'; |
|
|
|
comment on column public.filter_rule_detail.thing_code is '物编码'; |
|
|
|
comment on column public.filter_rule_detail.attr_name is '属性名称'; |
|
|
|
comment on column public.filter_rule_detail.attr_code is '属性编码'; |
|
|
|
comment on column public.filter_rule_detail.attr_alias is '属性在计算公式中的别名'; |
|
|
|
comment on column public.filter_rule_detail.data_type is '数据类型:1-最新,2-最近, 3-区间'; |
|
|
|
comment on column public.filter_rule_detail.agg_type is '聚合类型:SUM|AVG|MAX|MIN|COUNT'; |
|
|
|
comment on column public.filter_rule_detail.agg_interval is '聚合时间间隔'; |
|
|
|
comment on column public.filter_rule_detail.timeunit is '聚合时间单位:MINUTE|HOUR|DAY|MONTH'; |
|
|
|
comment on column public.filter_rule_detail.tenant_code is '租户编码'; |
|
|
|
comment on column public.filter_rule_detail.company_id is '企业id'; |
|
|
|
comment on column public.filter_rule_detail.dept_id is '部门id'; |
|
|
|
comment on column public.filter_rule_detail.creator is '创建人'; |
|
|
|
comment on column public.filter_rule_detail.create_date is '创建时间'; |
|
|
|
comment on column public.filter_rule_detail.updater is '更新人'; |
|
|
|
comment on column public.filter_rule_detail.update_date is '更新时间'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- ---------------------------- |
|
|
|
-- Table structure for gateway_component |
|
|
|
-- ---------------------------- |
|
|
|
|