/*
 Navicat Premium Data Transfer

 Source Server         : 106.120.102.238
 Source Server Type    : MySQL
 Source Server Version : 50731
 Source Host           : 106.120.102.238:16306
 Source Schema         : nacos

 Target Server Type    : MySQL
 Target Server Version : 50731
 File Encoding         : 65001

 Date: 20/02/2025 10:26:15
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for config_info
-- ----------------------------
DROP TABLE IF EXISTS `config_info`;
CREATE TABLE `config_info` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `data_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'data_id',
  `group_id` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `content` longtext COLLATE utf8_bin NOT NULL COMMENT 'content',
  `md5` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT 'md5',
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  `src_user` text COLLATE utf8_bin COMMENT 'source user',
  `src_ip` varchar(20) COLLATE utf8_bin DEFAULT NULL COMMENT 'source ip',
  `app_name` varchar(128) COLLATE utf8_bin DEFAULT NULL,
  `tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT '租户字段',
  `c_desc` varchar(256) COLLATE utf8_bin DEFAULT NULL,
  `c_use` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `effect` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `type` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  `c_schema` text COLLATE utf8_bin,
#   由于镜像用的是最新nacos版本，增加了 encrypted_data_key 字段 ，启动时候nacos会查询该字段，所以该字段不设置会报错
  `encrypted_data_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_configinfo_datagrouptenant` (`data_id`,`group_id`,`tenant_id`)
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info';

-- ----------------------------
-- Records of config_info
-- ----------------------------
BEGIN;
INSERT INTO `config_info` (`id`, `data_id`, `group_id`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `app_name`, `tenant_id`, `c_desc`, `c_use`, `effect`, `type`, `c_schema`) VALUES (47, 'application.properties', 'zgh', '# 服务端口\r\nserver.port = 16200\r\n#数据库设置\r\nspring.datasource.type = com.alibaba.druid.pool.DruidDataSource\r\n#spring.datasource.druid.driver-class-name = com.mysql.jdbc.Driver\r\nspring.datasource.druid.driver-class-name = com.mysql.cj.jdbc.Driver\r\nspring.datasource.druid.url = jdbc:mysql://172.40.0.20:3306/energy_show?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&rewriteBatchedStatements=true&useSSL=false&allowPublicKeyRetrieval=true\r\nspring.datasource.druid.username = admin\r\nspring.datasource.druid.password = [REDACTED]初始化大小\r\nspring.datasource.druid.initial-size = 10\r\n#最小\r\nspring.datasource.druid.min-idle = 10\r\n#最大\r\nspring.datasource.druid.max-active = 20\r\n#获取连接等待的超时时间\r\nspring.datasource.druid.max-wait = 600000\r\n#间隔多久进行一次检测,检测需要关闭的链接\r\nspring.datasource.druid.time-between-eviction-runs-millis = 60000\r\n#一个链接在池中最小生存时间\r\nspring.datasource.druid.min-evictable-idle-time-millis = 3000000\r\n##配置连接在池中的最大生存时间\r\n#spring.datasource.druid.max-evictable-idle-time-millis = 400000\r\nspring.datasource.druid.validation-query = SELECT \'x\'\r\nspring.datasource.druid.test-on-borrow = false\r\nspring.datasource.druid.test-on-return = false\r\n## 启用空闲连接检测，以便回收\r\nspring.datasource.druid.test-while-idle = true\r\n## 打开PSCache，并且指定每个连接上PSCache的大小\r\nspring.datasource.druid.pool-prepared-statements = false\r\nspring.datasource.druid.max-pool-prepared-statement-per-connection-size = 20\r\nspring.datasource.druid.remove-abandoned = true\r\nspring.datasource.druid.remove-abandoned-timeout = 7200\r\nspring.datasource.druid.log-abandoned = false\r\n\r\n#redis-config\r\nspring.redis.jedis.pool.max-idle = 100\r\nspring.redis.jedis.pool.min-idle = 10\r\nspring.redis.jedis.pool.max-active = 1000\r\nspring.redis.jedis.pool.max-wait = 100000\r\nspring.redis.database = 1\r\nspring.redis.host = 172.40.0.21\r\nspring.redis.port = 6379\r\nspring.redis.password = [REDACTED] http://172.40.0.24:9000\r\nminio.accessKey= admin\r\nminio.secretKey= password\r\nminio.bucketName= bucket-zhzn\r\nminio.bucketPath= http://172.40.0.24:9000\r\n\r\n#xxl-job\r\nxxl.job.admin.addresses = http://172.40.0.23:16800/xxl-job-admin\r\nxxl.job.admin.accessToken = \r\nxxl.job.executor.appname = xxl-job-executor-dev\r\nxxl.job.executor.address = \r\nxxl.job.executor.ip =\r\nxxl.job.executor.port = 9999\r\nxxl.job.executor.logpath = /usr/local/logs/xxl\r\nxxl.job.executor.logretentiondays = 30\r\n\r\n#上传文件模板\r\ntemplate.bzpower = http://172.40.0.24:9000/bucket-zhzn/template/%E6%A0%87%E5%87%86%E5%8A%9F%E7%8E%87%E6%9B%B2%E7%BA%BF%E6%A8%A1%E7%89%88.xlsx\r\ntemplate.htpower = http://172.40.0.24:9000/bucket-zhzn/template/%E5%90%88%E5%90%8C%E5%8A%9F%E7%8E%87%E6%9B%B2%E7%BA%BF%E6%A8%A1%E7%89%88.xlsx\r\ntemplate.field = http://172.40.0.24:9000/bucket-zhzn/template/%E9%A3%8E%E5%9C%BA%E8%A1%A8%E6%A8%A1%E7%89%88.xlsx\r\ntemplate.draught = http://172.40.0.24:9000/bucket-zhzn/template/%E9%A3%8E%E6%9C%BA%E8%A1%A8%E6%A8%A1%E7%89%88.xlsx\r\n\r\n#分析算法入参json格式\r\nanalysis.algorithm.json={\"dataContractType\": {\"type\": \"analysisExecuteOrder\",\"version\": \"1.2.0\"},\"dataContract\": {\"autoOrManual\": null,\"dataFilter\": {\"powerFarmID\": null,\"turbines\": null,\"dataBatchNum\": null,\"beginTime\": null,\"endTime\": null,\"excludingMonths\": null,\"customFilter\": {\"valueWindSpeed\": {\"min\": null,\"max\": null},\"valuePitchAngle\": {\"min\":null,\"max\": null},\"valueActivePower\": {\"min\": null,\"max\": null},\"valueGeneratorSpeed\": {\"min\": null,\"max\": null}}},\"configAnalysis\": [],\"graphSets\": {\"DgeneratorSpeed\": {\"step\": 5,\"min\": 0,\"max\": 30},\"DgeneratorTorque\": {\"step\": 10000,\"min\": 0,\"max\": 10000},\"IgeneratorSpeed\": {\"step\": 200,\"min\": 1000,\"max\": 2000},\"IgeneratorTorque\": {\"step\": 2000,\"min\": 0,\"max\": 12000},\"cp\": {\"step\": 0.1,\"min\": 0,\"max\": 1},\"tsr\": {\"step\": 5,\"min\": 0,\"max\": 30},\"pitchAngle\": {\"step\": 1,\"min\": -1,\"max\": 20},\"activePower\": {\"step\": 250,\"min\": 0,\"max\": 2000}}}}\r\n#需要特殊处理的图像设置属性\r\ngraphSets.properties=dgeneratorSpeed,igeneratorSpeed,dgeneratorTorque,igeneratorTorque,cp,tsr,pitchAngle,activePower\r\n#scada数据筛选\r\ncustomFilter.properties=valueWindSpeed,valuePitchAngle,valueActivePower,valueGeneratorSpeed\r\n#需要特设处理分析类型属性\r\nanalysis.properties.name=configAnalysis\r\n#分析类型json格式\r\nanalysis.type.json={\"package\":\"\",\"className\":\"\",\"methodName\":\"\",\"scada\":\"\"}\r\n\r\nanalysis.array.properties=turbines,excludingMonths\r\n#额定功率因数\r\npower.factor.rated=1.2\r\n#算法调用默认值\r\nanalysis.url= 172.40.0.26:8001/demo/dataAnalysis/analysis\r\n\r\n#内网minio host\r\nanalysis.file.intranet.addr=http://172.40.0.24:9001/\r\n#外网网minio host(外网暂未开放)\r\nanalysis.file.external.addr=http://172.40.0.24:9001/\r\n#分析结果文件路径中替换的字符串\r\nanalysis.file.replace.str= /manual/,/automatic/', '1b98899fe50f9d19c4717af9f2260c11', '2025-02-20 15:11:54', '2025-02-20 15:11:54', NULL, '192.168.50.201', '', '79c42a7a-2c7d-4dcf-8a2c-b334271e2191', NULL, NULL, NULL, 'properties', NULL);
COMMIT;

-- ----------------------------
-- Table structure for config_info_aggr
-- ----------------------------
DROP TABLE IF EXISTS `config_info_aggr`;
CREATE TABLE `config_info_aggr` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `data_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'data_id',
  `group_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'group_id',
  `datum_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'datum_id',
  `content` longtext COLLATE utf8_bin NOT NULL COMMENT '内容',
  `gmt_modified` datetime NOT NULL COMMENT '修改时间',
  `app_name` varchar(128) COLLATE utf8_bin DEFAULT NULL,
  `tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT '租户字段',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_configinfoaggr_datagrouptenantdatum` (`data_id`,`group_id`,`tenant_id`,`datum_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='增加租户字段';

-- ----------------------------
-- Records of config_info_aggr
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for config_info_beta
-- ----------------------------
DROP TABLE IF EXISTS `config_info_beta`;
CREATE TABLE `config_info_beta` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `data_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'data_id',
  `group_id` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'group_id',
  `app_name` varchar(128) COLLATE utf8_bin DEFAULT NULL COMMENT 'app_name',
  `content` longtext COLLATE utf8_bin NOT NULL COMMENT 'content',
  `beta_ips` varchar(1024) COLLATE utf8_bin DEFAULT NULL COMMENT 'betaIps',
  `md5` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT 'md5',
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  `src_user` text COLLATE utf8_bin COMMENT 'source user',
  `src_ip` varchar(20) COLLATE utf8_bin DEFAULT NULL COMMENT 'source ip',
  `tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT '租户字段',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_configinfobeta_datagrouptenant` (`data_id`,`group_id`,`tenant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info_beta';

-- ----------------------------
-- Records of config_info_beta
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for config_info_tag
-- ----------------------------
DROP TABLE IF EXISTS `config_info_tag`;
CREATE TABLE `config_info_tag` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `data_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'data_id',
  `group_id` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'group_id',
  `tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT 'tenant_id',
  `tag_id` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'tag_id',
  `app_name` varchar(128) COLLATE utf8_bin DEFAULT NULL COMMENT 'app_name',
  `content` longtext COLLATE utf8_bin NOT NULL COMMENT 'content',
  `md5` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT 'md5',
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  `src_user` text COLLATE utf8_bin COMMENT 'source user',
  `src_ip` varchar(20) COLLATE utf8_bin DEFAULT NULL COMMENT 'source ip',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_configinfotag_datagrouptenanttag` (`data_id`,`group_id`,`tenant_id`,`tag_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info_tag';

-- ----------------------------
-- Records of config_info_tag
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for config_tags_relation
-- ----------------------------
DROP TABLE IF EXISTS `config_tags_relation`;
CREATE TABLE `config_tags_relation` (
  `id` bigint(20) NOT NULL COMMENT 'id',
  `tag_name` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'tag_name',
  `tag_type` varchar(64) COLLATE utf8_bin DEFAULT NULL COMMENT 'tag_type',
  `data_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'data_id',
  `group_id` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'group_id',
  `tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT 'tenant_id',
  `nid` bigint(20) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`nid`),
  UNIQUE KEY `uk_configtagrelation_configidtag` (`id`,`tag_name`,`tag_type`),
  KEY `idx_tenant_id` (`tenant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_tag_relation';

-- ----------------------------
-- Records of config_tags_relation
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for group_capacity
-- ----------------------------
DROP TABLE IF EXISTS `group_capacity`;
CREATE TABLE `group_capacity` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `group_id` varchar(128) COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'Group ID，空字符表示整个集群',
  `quota` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '配额，0表示使用默认值',
  `usage` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '使用量',
  `max_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个配置大小上限，单位为字节，0表示使用默认值',
  `max_aggr_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '聚合子配置最大个数，，0表示使用默认值',
  `max_aggr_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个聚合数据的子配置大小上限，单位为字节，0表示使用默认值',
  `max_history_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最大变更历史数量',
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_group_id` (`group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='集群、各Group容量信息表';

-- ----------------------------
-- Records of group_capacity
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for his_config_info
-- ----------------------------
DROP TABLE IF EXISTS `his_config_info`;
CREATE TABLE `his_config_info` (
  `id` bigint(20) unsigned NOT NULL,
  `nid` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `data_id` varchar(255) COLLATE utf8_bin NOT NULL,
  `group_id` varchar(128) COLLATE utf8_bin NOT NULL,
  `app_name` varchar(128) COLLATE utf8_bin DEFAULT NULL COMMENT 'app_name',
  `content` longtext COLLATE utf8_bin NOT NULL,
  `md5` varchar(32) COLLATE utf8_bin DEFAULT NULL,
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `src_user` text COLLATE utf8_bin,
  `src_ip` varchar(20) COLLATE utf8_bin DEFAULT NULL,
  `op_type` char(10) COLLATE utf8_bin DEFAULT NULL,
  `tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT '租户字段',
  PRIMARY KEY (`nid`),
  KEY `idx_gmt_create` (`gmt_create`),
  KEY `idx_gmt_modified` (`gmt_modified`),
  KEY `idx_did` (`data_id`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='多租户改造';

-- ----------------------------
-- Records of his_config_info
-- ----------------------------
BEGIN;
INSERT INTO `his_config_info` (`id`, `nid`, `data_id`, `group_id`, `app_name`, `content`, `md5`, `gmt_create`, `gmt_modified`, `src_user`, `src_ip`, `op_type`, `tenant_id`) VALUES (0, 24, 'application.properties', 'zgh', '', '# 服务端口\r\nserver.port = 16200\r\n#数据库设置\r\nspring.datasource.type = com.alibaba.druid.pool.DruidDataSource\r\n#spring.datasource.druid.driver-class-name = com.mysql.jdbc.Driver\r\nspring.datasource.druid.driver-class-name = com.mysql.cj.jdbc.Driver\r\nspring.datasource.druid.url = jdbc:mysql://172.40.0.20:3306/energy_show?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&rewriteBatchedStatements=true&useSSL=false&allowPublicKeyRetrieval=true\r\nspring.datasource.druid.username = admin\r\nspring.datasource.druid.password = [REDACTED]初始化大小\r\nspring.datasource.druid.initial-size = 10\r\n#最小\r\nspring.datasource.druid.min-idle = 10\r\n#最大\r\nspring.datasource.druid.max-active = 20\r\n#获取连接等待的超时时间\r\nspring.datasource.druid.max-wait = 600000\r\n#间隔多久进行一次检测,检测需要关闭的链接\r\nspring.datasource.druid.time-between-eviction-runs-millis = 60000\r\n#一个链接在池中最小生存时间\r\nspring.datasource.druid.min-evictable-idle-time-millis = 3000000\r\n##配置连接在池中的最大生存时间\r\n#spring.datasource.druid.max-evictable-idle-time-millis = 400000\r\nspring.datasource.druid.validation-query = SELECT \'x\'\r\nspring.datasource.druid.test-on-borrow = false\r\nspring.datasource.druid.test-on-return = false\r\n## 启用空闲连接检测，以便回收\r\nspring.datasource.druid.test-while-idle = true\r\n## 打开PSCache，并且指定每个连接上PSCache的大小\r\nspring.datasource.druid.pool-prepared-statements = false\r\nspring.datasource.druid.max-pool-prepared-statement-per-connection-size = 20\r\nspring.datasource.druid.remove-abandoned = true\r\nspring.datasource.druid.remove-abandoned-timeout = 7200\r\nspring.datasource.druid.log-abandoned = false\r\n\r\n#redis-config\r\nspring.redis.jedis.pool.max-idle = 100\r\nspring.redis.jedis.pool.min-idle = 10\r\nspring.redis.jedis.pool.max-active = 1000\r\nspring.redis.jedis.pool.max-wait = 100000\r\nspring.redis.database = 1\r\nspring.redis.host = 172.40.0.21\r\nspring.redis.port = 6379\r\nspring.redis.password = [REDACTED] http://172.40.0.24:9000\r\nminio.accessKey= admin\r\nminio.secretKey= password\r\nminio.bucketName= bucket-zhzn\r\nminio.bucketPath= http://172.40.0.24:9000\r\n\r\n#xxl-job\r\nxxl.job.admin.addresses = http://172.40.0.23:16800/xxl-job-admin\r\nxxl.job.admin.accessToken = \r\nxxl.job.executor.appname = xxl-job-executor-dev\r\nxxl.job.executor.address = \r\nxxl.job.executor.ip =\r\nxxl.job.executor.port = 9999\r\nxxl.job.executor.logpath = /usr/local/logs/xxl\r\nxxl.job.executor.logretentiondays = 30\r\n\r\n#上传文件模板\r\ntemplate.bzpower = http://172.40.0.24:9000/bucket-zhzn/template/%E6%A0%87%E5%87%86%E5%8A%9F%E7%8E%87%E6%9B%B2%E7%BA%BF%E6%A8%A1%E7%89%88.xlsx\r\ntemplate.htpower = http://172.40.0.24:9000/bucket-zhzn/template/%E5%90%88%E5%90%8C%E5%8A%9F%E7%8E%87%E6%9B%B2%E7%BA%BF%E6%A8%A1%E7%89%88.xlsx\r\ntemplate.field = http://172.40.0.24:9000/bucket-zhzn/template/%E9%A3%8E%E5%9C%BA%E8%A1%A8%E6%A8%A1%E7%89%88.xlsx\r\ntemplate.draught = http://172.40.0.24:9000/bucket-zhzn/template/%E9%A3%8E%E6%9C%BA%E8%A1%A8%E6%A8%A1%E7%89%88.xlsx\r\n\r\n#分析算法入参json格式\r\nanalysis.algorithm.json={\"dataContractType\": {\"type\": \"analysisExecuteOrder\",\"version\": \"1.2.0\"},\"dataContract\": {\"autoOrManual\": null,\"dataFilter\": {\"powerFarmID\": null,\"turbines\": null,\"dataBatchNum\": null,\"beginTime\": null,\"endTime\": null,\"excludingMonths\": null,\"customFilter\": {\"valueWindSpeed\": {\"min\": null,\"max\": null},\"valuePitchAngle\": {\"min\":null,\"max\": null},\"valueActivePower\": {\"min\": null,\"max\": null},\"valueGeneratorSpeed\": {\"min\": null,\"max\": null}}},\"configAnalysis\": [],\"graphSets\": {\"DgeneratorSpeed\": {\"step\": 5,\"min\": 0,\"max\": 30},\"DgeneratorTorque\": {\"step\": 10000,\"min\": 0,\"max\": 10000},\"IgeneratorSpeed\": {\"step\": 200,\"min\": 1000,\"max\": 2000},\"IgeneratorTorque\": {\"step\": 2000,\"min\": 0,\"max\": 12000},\"cp\": {\"step\": 0.1,\"min\": 0,\"max\": 1},\"tsr\": {\"step\": 5,\"min\": 0,\"max\": 30},\"pitchAngle\": {\"step\": 1,\"min\": -1,\"max\": 20},\"activePower\": {\"step\": 250,\"min\": 0,\"max\": 2000}}}}\r\n#需要特殊处理的图像设置属性\r\ngraphSets.properties=dgeneratorSpeed,igeneratorSpeed,dgeneratorTorque,igeneratorTorque,cp,tsr,pitchAngle,activePower\r\n#scada数据筛选\r\ncustomFilter.properties=valueWindSpeed,valuePitchAngle,valueActivePower,valueGeneratorSpeed\r\n#需要特设处理分析类型属性\r\nanalysis.properties.name=configAnalysis\r\n#分析类型json格式\r\nanalysis.type.json={\"package\":\"\",\"className\":\"\",\"methodName\":\"\",\"scada\":\"\"}\r\n\r\nanalysis.array.properties=turbines,excludingMonths\r\n#额定功率因数\r\npower.factor.rated=1.2\r\n#算法调用默认值\r\nanalysis.url= 172.40.0.26:8001/demo/dataAnalysis/analysis\r\n\r\n#内网minio host\r\nanalysis.file.intranet.addr=http://172.40.0.24:9001/\r\n#外网网minio host(外网暂未开放)\r\nanalysis.file.external.addr=http://172.40.0.24:9001/\r\n#分析结果文件路径中替换的字符串\r\nanalysis.file.replace.str= /manual/,/automatic/', '1b98899fe50f9d19c4717af9f2260c11', '2025-02-20 15:11:54', '2025-02-20 15:11:54', NULL, '192.168.50.201', 'I', '79c42a7a-2c7d-4dcf-8a2c-b334271e2191');
COMMIT;

-- ----------------------------
-- Table structure for permissions
-- ----------------------------
DROP TABLE IF EXISTS `permissions`;
CREATE TABLE `permissions` (
  `role` varchar(50) NOT NULL,
  `resource` varchar(512) NOT NULL,
  `action` varchar(8) NOT NULL,
  UNIQUE KEY `uk_role_permission` (`role`,`resource`,`action`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of permissions
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for roles
-- ----------------------------
DROP TABLE IF EXISTS `roles`;
CREATE TABLE `roles` (
  `username` varchar(50) NOT NULL,
  `role` varchar(50) NOT NULL,
  UNIQUE KEY `idx_user_role` (`username`,`role`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of roles
-- ----------------------------
BEGIN;
INSERT INTO `roles` (`username`, `role`) VALUES ('nacos', 'ROLE_ADMIN');
COMMIT;

-- ----------------------------
-- Table structure for tenant_capacity
-- ----------------------------
DROP TABLE IF EXISTS `tenant_capacity`;
CREATE TABLE `tenant_capacity` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `tenant_id` varchar(128) COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'Tenant ID',
  `quota` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '配额，0表示使用默认值',
  `usage` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '使用量',
  `max_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个配置大小上限，单位为字节，0表示使用默认值',
  `max_aggr_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '聚合子配置最大个数',
  `max_aggr_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个聚合数据的子配置大小上限，单位为字节，0表示使用默认值',
  `max_history_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最大变更历史数量',
  `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_tenant_id` (`tenant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='租户容量信息表';

-- ----------------------------
-- Records of tenant_capacity
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for tenant_info
-- ----------------------------
DROP TABLE IF EXISTS `tenant_info`;
CREATE TABLE `tenant_info` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `kp` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'kp',
  `tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT 'tenant_id',
  `tenant_name` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT 'tenant_name',
  `tenant_desc` varchar(256) COLLATE utf8_bin DEFAULT NULL COMMENT 'tenant_desc',
  `create_source` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT 'create_source',
  `gmt_create` bigint(20) NOT NULL COMMENT '创建时间',
  `gmt_modified` bigint(20) NOT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_tenant_info_kptenantid` (`kp`,`tenant_id`),
  KEY `idx_tenant_id` (`tenant_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='tenant_info';

-- ----------------------------
-- Records of tenant_info
-- ----------------------------
BEGIN;
INSERT INTO `tenant_info` (`id`, `kp`, `tenant_id`, `tenant_name`, `tenant_desc`, `create_source`, `gmt_create`, `gmt_modified`) VALUES (1, '1', '79c42a7a-2c7d-4dcf-8a2c-b334271e2191', 'energy-manage-service', 'energy-manage-service', 'nacos', 1714270021621, 1714270021621);
COMMIT;

-- ----------------------------
-- Table structure for users
-- ----------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
  `username` varchar(50) NOT NULL,
  `password` varchar(500) NOT NULL,
  `enabled` tinyint(1) NOT NULL,
  PRIMARY KEY (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of users
-- ----------------------------
BEGIN;
INSERT INTO `users` (`username`, `password`, `enabled`) VALUES ('nacos', '$2a$10$EuWPZHzz32dJN7jexM34MOeYirDdFAZm2kuWj7VEOJhhZkDrxfvUu', 1);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
