Commit 6121ed6a authored by 吴文龙's avatar 吴文龙

Update hsiotdb_pgsql_03.sql

parent e3006804
CREATE TABLE "public"."hs_device_order_statistical" (
"id" uuid NOT NULL,
"device_id" uuid NOT NULL,
"order_no" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
"code" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
"statistic_val" numeric(10,4),
"current_val" varchar(255) COLLATE "pg_catalog"."default",
"first_val" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
"order_status" varchar(255) COLLATE "pg_catalog"."default" DEFAULT 'underway'::character varying,
"device_name" varchar(255) COLLATE "pg_catalog"."default",
"order_array" varchar(1000) COLLATE "pg_catalog"."default",
"tenant_id" uuid,
"start_time" timestamp(6),
"end_time" timestamp(6),
"created_time" int8,
"updated_time" int8 NOT NULL,
CONSTRAINT "hs_device_order_statistical_pkey" PRIMARY KEY ("id"),
CONSTRAINT "hs_device_order_statistical_device_id_order_no_code_key" UNIQUE ("device_id", "order_no", "code")
)
;
ALTER TABLE "public"."hs_device_order_statistical"
OWNER TO "postgres";
COMMENT ON COLUMN "public"."hs_device_order_statistical"."device_id" IS '设备标识';
COMMENT ON COLUMN "public"."hs_device_order_statistical"."order_no" IS '订单号';
COMMENT ON COLUMN "public"."hs_device_order_statistical"."code" IS 'water-水;electric-电;vapor-蒸汽;output-产量';
COMMENT ON COLUMN "public"."hs_device_order_statistical"."statistic_val" IS '统计值';
COMMENT ON COLUMN "public"."hs_device_order_statistical"."current_val" IS '采集值';
COMMENT ON COLUMN "public"."hs_device_order_statistical"."first_val" IS '订单开始时首次采集值';
COMMENT ON COLUMN "public"."hs_device_order_statistical"."order_status" IS '订单状态(underway-进行中;close-结束)';
COMMENT ON COLUMN "public"."hs_device_order_statistical"."device_name" IS '设备名称';
COMMENT ON COLUMN "public"."hs_device_order_statistical"."order_array" IS '订单明细';
COMMENT ON COLUMN "public"."hs_device_order_statistical"."tenant_id" IS '租户标识';
COMMENT ON COLUMN "public"."hs_device_order_statistical"."start_time" IS '开始时间';
COMMENT ON COLUMN "public"."hs_device_order_statistical"."end_time" IS '结束时间';
COMMENT ON COLUMN "public"."hs_device_order_statistical"."created_time" IS '创建时间戳';
COMMENT ON COLUMN "public"."hs_device_order_statistical"."updated_time" IS '修改时间戳';
COMMENT ON TABLE "public"."hs_device_order_statistical" IS '统计设备订单的能耗产量(kafka)
';
CREATE TABLE "public"."hs_order_statistical" (
"id" uuid NOT NULL,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment