Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
docker-iot-v3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
deploy
docker-iot-v3
Commits
6121ed6a
Commit
6121ed6a
authored
Aug 07, 2023
by
吴文龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update hsiotdb_pgsql_03.sql
parent
e3006804
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
0 deletions
+57
-0
hsiotdb_pgsql_03.sql
db/hsiotdb_pgsql_03.sql
+57
-0
No files found.
db/hsiotdb_pgsql_03.sql
View file @
6121ed6a
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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment