


-- 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.29: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.29', '默认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.29', '默认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 (4, null, null, null, '10.60.16.29', '边缘节点服务器');
select setval('public.hv_em_server_id_seq'::regclass, 100);

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

INSERT INTO public.hv_em_service (id, create_time, update_time, service_name, service_ip, port, description, version, service_type) VALUES (21,null,null,'edge-management','10.60.16.29','9700','边缘管理服务','2.5.1','BUSINESS_SERVICE');
INSERT INTO public.hv_em_service (id, create_time, update_time, service_name, service_ip, port, description, version, service_type) VALUES (22,null,null,'nacos','10.60.16.29','8848','注册中心','v2.1.1','BUSINESS_SERVICE');
INSERT INTO public.hv_em_service (id, create_time, update_time, service_name, service_ip, port, description, version, service_type) VALUES (23,null,null,'auth','10.60.16.29','9010','人员权限服务','1.31.2','BUSINESS_SERVICE');
INSERT INTO public.hv_em_service (id, create_time, update_time, service_name, service_ip, port, description, version, service_type) VALUES (24,null,null,'gateway-license','10.60.16.29','9000','网关服务','2.13.1','BUSINESS_SERVICE');
INSERT INTO public.hv_em_service (id, create_time, update_time, service_name, service_ip, port, description, version, service_type) VALUES (25,null,null,'data-query-service','10.60.16.29','9812','数据查询服务','2.0.2','BUSINESS_SERVICE');
INSERT INTO public.hv_em_service (id, create_time, update_time, service_name, service_ip, port, description, version, service_type) VALUES (26,null,null,'data-storage-service','10.60.16.29','9814','数据存储服务','2.0.3','BUSINESS_SERVICE');
INSERT INTO public.hv_em_service (id, create_time, update_time, service_name, service_ip, port, description, version, service_type) VALUES (27,null,null,'data-process','10.60.16.29','9819','数据引擎服务','2.0.2','BUSINESS_SERVICE');
INSERT INTO public.hv_em_service (id, create_time, update_time, service_name, service_ip, port, description, version, service_type) VALUES (28,null,null,'hiper-matrix-web','10.60.16.29','9030','web服务','2.1.1','BUSINESS_SERVICE');
INSERT INTO public.hv_em_service (id, create_time, update_time, service_name, service_ip, port, description, version, service_type) VALUES (29,null,null,'system-service','10.60.16.29','9850','系统服务','2.1.1','BUSINESS_SERVICE');
INSERT INTO public.hv_em_service (id, create_time, update_time, service_name, service_ip, port, description, version, service_type) VALUES (30,null,null,'iot-alarm','10.60.16.29','9860','报警服务','2.0.1','BUSINESS_SERVICE');
INSERT INTO public.hv_em_service (id, create_time, update_time, service_name, service_ip, port, description, version, service_type) VALUES (31,null,null,'edge-connection','10.60.16.29','9800','边缘采集服务','2.5.1','BUSINESS_SERVICE');
INSERT INTO public.hv_em_service (id, create_time, update_time, service_name, service_ip, port, description, version, service_type) VALUES (33,null,null,'influxdb','10.60.16.29','8086','时序数据库服务',null,'MIDDLEWARE_SERVER');
INSERT INTO public.hv_em_service (id, create_time, update_time, service_name, service_ip, port, description, version, service_type) VALUES (34,null,null,'rabbitmq','10.60.16.29','5672','消息队列服务',null,'MIDDLEWARE_SERVER');
INSERT INTO public.hv_em_service (id, create_time, update_time, service_name, service_ip, port, description, version, service_type) VALUES (35,null,null,'redis','10.60.16.29','6379','缓存服务',null,'MIDDLEWARE_SERVER');
select setval('public.hv_em_service_id_seq'::regclass, 100);