


-- system-service table
-- ----------------------------
-- Table structure for hv_em_ds_management
-- ----------------------------

DROP SEQUENCE IF EXISTS "public"."hv_em_ds_management_id_seq";
CREATE SEQUENCE IF NOT EXISTS "public"."hv_em_ds_management_id_seq" AS integer;

CREATE TABLE "public"."hv_em_ds_management" (
                                                "id" int8 NOT NULL DEFAULT nextval('hv_em_ds_management_id_seq'::regclass),
                                                "create_time" timestamptz(6),
                                                "update_time" timestamptz(6),
                                                "db_type" varchar(50) COLLATE "pg_catalog"."default",
                                                "connect_name" varchar(50) COLLATE "pg_catalog"."default",
                                                "description" varchar(255) COLLATE "pg_catalog"."default",
                                                "address" varchar(255) COLLATE "pg_catalog"."default",
                                                "port" varchar(255) COLLATE "pg_catalog"."default",
                                                "db_name" varchar(255) COLLATE "pg_catalog"."default",
                                                "table_name" varchar(255) COLLATE "pg_catalog"."default",
                                                "user_name" varchar(255) COLLATE "pg_catalog"."default",
                                                "password" varchar(255) COLLATE "pg_catalog"."default",
                                                "sid" varchar(255) COLLATE "pg_catalog"."default",
                                                "service_name" varchar(255) COLLATE "pg_catalog"."default",
                                                "monitor_frequency" varchar(255) COLLATE "pg_catalog"."default",
                                                "storage" numeric,
                                                "enable_ssl" bool,
                                                "trust_certificate_key_store_url" varchar(255) COLLATE "pg_catalog"."default",
                                                "trust_certificate_key_store_content" text COLLATE "pg_catalog"."default",
                                                "ca_key_store" varchar(255) COLLATE "pg_catalog"."default",
                                                "ca_key_store_content" text COLLATE "pg_catalog"."default",
                                                "ca_key_store_pass_word" varchar(255) COLLATE "pg_catalog"."default",
                                                "trust_certificate_key_store_password" varchar(255) COLLATE "pg_catalog"."default",
                                                "client_certificate_key_store_url" varchar(255) COLLATE "pg_catalog"."default",
                                                "client_certificate_key_store_content" text COLLATE "pg_catalog"."default",
                                                "client_certificate_key_store_password" varchar(255) COLLATE "pg_catalog"."default",
                                                "exchange_name" varchar(255) COLLATE "pg_catalog"."default",
                                                "exchange_type" varchar(255) COLLATE "pg_catalog"."default",
                                                "topic" varchar(255) COLLATE "pg_catalog"."default",
                                                "mqtt_version" varchar(255) COLLATE "pg_catalog"."default",
                                                "client_id" varchar(255) COLLATE "pg_catalog"."default"
)
;

-- ----------------------------
-- Indexes structure for table hv_em_ds_management
-- ----------------------------
CREATE UNIQUE INDEX "名称已存在" ON "public"."hv_em_ds_management" USING btree (
    "connect_name" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
    );

-- ----------------------------
-- Primary Key structure for table hv_em_ds_management
-- ----------------------------
ALTER TABLE "public"."hv_em_ds_management" ADD CONSTRAINT "hv_em_ds_management_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Table structure for hv_em_server
-- ----------------------------

DROP SEQUENCE IF EXISTS "public"."hv_em_server_id_seq";
CREATE SEQUENCE IF NOT EXISTS "public"."hv_em_server_id_seq" AS integer;

CREATE TABLE "public"."hv_em_server" (
                                         "id" int8 NOT NULL DEFAULT nextval('hv_em_server_id_seq'::regclass),
                                         "create_time" timestamptz(6),
                                         "update_time" timestamptz(6),
                                         "server_name" text COLLATE "pg_catalog"."default",
                                         "server_ip" text COLLATE "pg_catalog"."default",
                                         "description" text COLLATE "pg_catalog"."default"
)
;

-- ----------------------------
-- Primary Key structure for table hv_em_server
-- ----------------------------
ALTER TABLE "public"."hv_em_server" ADD CONSTRAINT "hv_em_server_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Table structure for hv_em_service
-- ----------------------------

DROP SEQUENCE IF EXISTS "public"."hv_em_service_id_seq";
CREATE SEQUENCE IF NOT EXISTS "public"."hv_em_service_id_seq" AS integer;

CREATE TABLE "public"."hv_em_service" (
                                          "id" int8 NOT NULL DEFAULT nextval('hv_em_service_id_seq'::regclass),
                                          "create_time" timestamptz(6),
                                          "update_time" timestamptz(6),
                                          "service_name" text COLLATE "pg_catalog"."default",
                                          "service_ip" text COLLATE "pg_catalog"."default",
                                          "port" text COLLATE "pg_catalog"."default",
                                          "description" text COLLATE "pg_catalog"."default",
                                          "version" text COLLATE "pg_catalog"."default",
                                          "service_type" varchar(40) COLLATE "pg_catalog"."default"
)
;

-- ----------------------------
-- Primary Key structure for table hv_em_service
-- ----------------------------
ALTER TABLE "public"."hv_em_service" ADD CONSTRAINT "hv_em_service_pkey" PRIMARY KEY ("id");



-- system-service

INSERT INTO public.hv_em_ds_management (id, address, connect_name, create_time, db_name, db_type, description, monitor_frequency, password, port, service_name, sid, storage, table_name, update_time, user_name, exchange_name, exchange_type, client_id, enable_ssl, trust_certificate_key_store_url, trust_certificate_key_store_content, ca_key_store, ca_key_store_content, ca_key_store_pass_word, trust_certificate_key_store_password, client_certificate_key_store_url, client_certificate_key_store_content, client_certificate_key_store_password, topic, mqtt_version) VALUES (640, 'tcp://10.60.16.200:1883', '默认MQTT Server', clock_timestamp(), NULL, 'MQTT', 'Matrix平台内置MQTT Server', NULL, 'Matrix@hVisionS2MQ', NULL, NULL, NULL, NULL, NULL, clock_timestamp(), 'admin', NULL, NULL, 'hvisions-mqtt-client', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO public.hv_em_ds_management (id, address, connect_name, create_time, db_name, db_type, description, monitor_frequency, password, port, service_name, sid, storage, table_name, update_time, user_name, exchange_name, exchange_type, client_id, enable_ssl, trust_certificate_key_store_url, trust_certificate_key_store_content, ca_key_store, ca_key_store_content, ca_key_store_pass_word, trust_certificate_key_store_password, client_certificate_key_store_url, client_certificate_key_store_content, client_certificate_key_store_password, topic, mqtt_version) VALUES (642, '10.60.16.200', '默认InfluxDB Server', clock_timestamp(), 'hiot', 'INFLUXDB', 'Matrix平台内置InfluxDB Server', NULL, 'Matrix@hVisionS2TSDB', '8086', NULL, NULL, NULL, NULL, clock_timestamp(), 'admin', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO public.hv_em_ds_management (id, address, connect_name, create_time, db_name, db_type, description, monitor_frequency, password, port, service_name, sid, storage, table_name, update_time, user_name, exchange_name, exchange_type, client_id, enable_ssl, trust_certificate_key_store_url, trust_certificate_key_store_content, ca_key_store, ca_key_store_content, ca_key_store_pass_word, trust_certificate_key_store_password, client_certificate_key_store_url, client_certificate_key_store_content, client_certificate_key_store_password, topic, mqtt_version) VALUES (643, '10.60.16.200', '默认RabbitMQ Server', clock_timestamp(), NULL, 'RabbitMQ', 'Matrix平台内置RabbitMQ Server', NULL, 'Matrix@hVisionS2MQ', '5672', NULL, NULL, NULL, NULL, clock_timestamp(), 'admin', 'hiot', 'topic', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);

select setval('public.hv_em_ds_management_id_seq'::regclass, 700);


--Data for  Name: hv_em_server; Type: Table; Schema: public;

INSERT INTO public.hv_em_server (id, create_time, update_time, description, server_ip, server_name) VALUES (5, null, null, null, '10.60.16.29', '边缘节点服务器-1');
INSERT INTO public.hv_em_server (id, create_time, update_time, description, server_ip, server_name) VALUES (7, null, null, null, '10.60.16.30', '边缘节点服务器-2');
INSERT INTO public.hv_em_server (id, create_time, update_time, description, server_ip, server_name) VALUES (9, null, null, null, '10.60.16.31', '边缘节点服务器-3');

select setval('public.hv_em_server_id_seq'::regclass, 100);

--Data for  Name: hv_em_service; Type: Table; Schema: public;

-- ----------------------------
-- Records of hv_em_service
-- ----------------------------
INSERT INTO public.hv_em_service (id, create_time, update_time, description, service_ip, service_name, port, service_type, version) VALUES (23, null, null, '时序数据库服务', '10.60.16.29', 'influxdb', '8086', 'MIDDLEWARE_SERVER', null);
INSERT INTO public.hv_em_service (id, create_time, update_time, description, service_ip, service_name, port, service_type, version) VALUES (25, null, null, '消息队列服务', '10.60.16.29', 'rabbitmq', '5672', 'MIDDLEWARE_SERVER', null);
INSERT INTO public.hv_em_service (id, create_time, update_time, description, service_ip, service_name, port, service_type, version) VALUES (27, null, null, '缓存服务', '10.60.16.29', 'redis-1', '6379', 'MIDDLEWARE_SERVER', null);
INSERT INTO public.hv_em_service (id, create_time, update_time, description, service_ip, service_name, port, service_type, version) VALUES (29, null, null, '分布式协调服务', '10.60.16.29', 'zookeeper-1', '2181', 'MIDDLEWARE_SERVER', null);
INSERT INTO public.hv_em_service (id, create_time, update_time, description, service_ip, service_name, port, service_type, version) VALUES (31, null, null, '边缘管理服务', '10.60.16.29', 'edge-management', '9700', 'BUSINESS_SERVICE', '2.5.1');
INSERT INTO public.hv_em_service (id, create_time, update_time, description, service_ip, service_name, port, service_type, version) VALUES (33, null, null, '注册中心', '10.60.16.29', 'nacos', '8848', 'BUSINESS_SERVICE', 'v2.1.1');
INSERT INTO public.hv_em_service (id, create_time, update_time, description, service_ip, service_name, port, service_type, version) VALUES (35, null, null, '人员权限服务', '10.60.16.29', 'auth', '9010', 'BUSINESS_SERVICE', '1.31.2');
INSERT INTO public.hv_em_service (id, create_time, update_time, description, service_ip, service_name, port, service_type, version) VALUES (37, null, null, '网关服务', '10.60.16.29', 'gateway-license', '9000', 'BUSINESS_SERVICE', '2.13.1');
INSERT INTO public.hv_em_service (id, create_time, update_time, description, service_ip, service_name, port, service_type, version) VALUES (39, null, null, '数据查询服务', '10.60.16.29', 'data-query-service', '9812', 'BUSINESS_SERVICE', '2.0.2');
INSERT INTO public.hv_em_service (id, create_time, update_time, description, service_ip, service_name, port, service_type, version) VALUES (41, null, null, '数据存储服务', '10.60.16.29', 'data-storage-service', '9814', 'BUSINESS_SERVICE', '2.0.3');
INSERT INTO public.hv_em_service (id, create_time, update_time, description, service_ip, service_name, port, service_type, version) VALUES (43, null, null, '数据引擎服务', '10.60.16.29', 'data-process', '9819', 'BUSINESS_SERVICE', '2.0.2');
INSERT INTO public.hv_em_service (id, create_time, update_time, description, service_ip, service_name, port, service_type, version) VALUES (45, null, null, 'web服务', '10.60.16.29', 'hiper-matrix-web', '9030', 'BUSINESS_SERVICE', '2.1.1');
INSERT INTO public.hv_em_service (id, create_time, update_time, description, service_ip, service_name, port, service_type, version) VALUES (47, null, null, '系统服务', '10.60.16.29', 'system-service', '9850', 'BUSINESS_SERVICE', '2.1.1');
INSERT INTO public.hv_em_service (id, create_time, update_time, description, service_ip, service_name, port, service_type, version) VALUES (49, null, null, '报警服务', '10.60.16.29', 'iot-alarm', '9860', 'BUSINESS_SERVICE', '2.0.1');
INSERT INTO public.hv_em_service (id, create_time, update_time, description, service_ip, service_name, port, service_type, version) VALUES (51, null, null, '边缘采集服务', '10.60.16.29', 'edge-connection', '9800', 'BUSINESS_SERVICE', '2.5.1');

INSERT INTO public.hv_em_service (id, create_time, update_time, description, service_ip, service_name, port, service_type, version) VALUES (55, null, null, '时序数据库服务', '10.60.16.30', 'influxdb', '8086', 'MIDDLEWARE_SERVER', null);
INSERT INTO public.hv_em_service (id, create_time, update_time, description, service_ip, service_name, port, service_type, version) VALUES (57, null, null, '消息队列服务', '10.60.16.30', 'rabbitmq', '5672', 'MIDDLEWARE_SERVER', null);
INSERT INTO public.hv_em_service (id, create_time, update_time, description, service_ip, service_name, port, service_type, version) VALUES (59, null, null, '缓存服务', '10.60.16.30', 'redis-2', '6379', 'MIDDLEWARE_SERVER', null);
INSERT INTO public.hv_em_service (id, create_time, update_time, description, service_ip, service_name, port, service_type, version) VALUES (61, null, null, '分布式协调服务', '10.60.16.30', 'zookeeper-2', '2181', 'MIDDLEWARE_SERVER', null);
INSERT INTO public.hv_em_service (id, create_time, update_time, description, service_ip, service_name, port, service_type, version) VALUES (63, null, null, '边缘管理服务', '10.60.16.30', 'edge-management', '9700', 'BUSINESS_SERVICE', '2.5.1');
INSERT INTO public.hv_em_service (id, create_time, update_time, description, service_ip, service_name, port, service_type, version) VALUES (65, null, null, '注册中心', '10.60.16.30', 'nacos', '8848', 'BUSINESS_SERVICE', 'v2.1.1');
INSERT INTO public.hv_em_service (id, create_time, update_time, description, service_ip, service_name, port, service_type, version) VALUES (67, null, null, '人员权限服务', '10.60.16.30', 'auth', '9010', 'BUSINESS_SERVICE', '1.31.2');
INSERT INTO public.hv_em_service (id, create_time, update_time, description, service_ip, service_name, port, service_type, version) VALUES (69, null, null, '网关服务', '10.60.16.30', 'gateway-license', '9000', 'BUSINESS_SERVICE', '2.13.1');
INSERT INTO public.hv_em_service (id, create_time, update_time, description, service_ip, service_name, port, service_type, version) VALUES (71, null, null, '数据查询服务', '10.60.16.30', 'data-query-service', '9812', 'BUSINESS_SERVICE', '2.0.2');
INSERT INTO public.hv_em_service (id, create_time, update_time, description, service_ip, service_name, port, service_type, version) VALUES (73, null, null, '数据存储服务', '10.60.16.30', 'data-storage-service', '9814', 'BUSINESS_SERVICE', '2.0.3');
INSERT INTO public.hv_em_service (id, create_time, update_time, description, service_ip, service_name, port, service_type, version) VALUES (75, null, null, '数据引擎服务', '10.60.16.30', 'data-process', '9819', 'BUSINESS_SERVICE', '2.0.2');
INSERT INTO public.hv_em_service (id, create_time, update_time, description, service_ip, service_name, port, service_type, version) VALUES (77, null, null, 'web服务', '10.60.16.30', 'hiper-matrix-web', '9030', 'BUSINESS_SERVICE', '2.1.1');
INSERT INTO public.hv_em_service (id, create_time, update_time, description, service_ip, service_name, port, service_type, version) VALUES (79, null, null, '系统服务', '10.60.16.30', 'system-service', '9850', 'BUSINESS_SERVICE', '2.1.1');
INSERT INTO public.hv_em_service (id, create_time, update_time, description, service_ip, service_name, port, service_type, version) VALUES (81, null, null, '报警服务', '10.60.16.30', 'iot-alarm', '9860', 'BUSINESS_SERVICE', '2.0.1');
INSERT INTO public.hv_em_service (id, create_time, update_time, description, service_ip, service_name, port, service_type, version) VALUES (83, null, null, '边缘采集服务', '10.60.16.30', 'edge-connection', '9800', 'BUSINESS_SERVICE', '2.5.1');

INSERT INTO public.hv_em_service (id, create_time, update_time, description, service_ip, service_name, port, service_type, version) VALUES (85, null, null, '消息队列服务', '10.60.16.31', 'rabbitmq', '5672', 'MIDDLEWARE_SERVER', null);
INSERT INTO public.hv_em_service (id, create_time, update_time, description, service_ip, service_name, port, service_type, version) VALUES (87, null, null, '缓存服务', '10.60.16.31', 'redis-3', '6379', 'MIDDLEWARE_SERVER', null);
INSERT INTO public.hv_em_service (id, create_time, update_time, description, service_ip, service_name, port, service_type, version) VALUES (89, null, null, '分布式协调服务', '10.60.16.31', 'zookeeper-3', '2181', 'MIDDLEWARE_SERVER', null);
INSERT INTO public.hv_em_service (id, create_time, update_time, description, service_ip, service_name, port, service_type, version) VALUES (91, null, null, '注册中心', '10.60.16.31', 'nacos', '8848', 'BUSINESS_SERVICE', 'v2.1.1');


select setval('public.hv_em_service_id_seq'::regclass, 100);