From 20748641c04dc9a692d7bea3697f08c9c884c3d0 Mon Sep 17 00:00:00 2001
From: dengzedong <dengzedong@email>
Date: 星期二, 05 十一月 2024 09:29:31 +0800
Subject: [PATCH] cpp.vm

---
 iailab-module-model/iailab-module-model-biz/db/mysql.sql |  111 ++++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 72 insertions(+), 39 deletions(-)

diff --git a/iailab-module-model/iailab-module-model-biz/db/mysql.sql b/iailab-module-model/iailab-module-model-biz/db/mysql.sql
index c8e5d06..7763dd3 100644
--- a/iailab-module-model/iailab-module-model-biz/db/mysql.sql
+++ b/iailab-module-model/iailab-module-model-biz/db/mysql.sql
@@ -11,7 +11,8 @@
   update_time     datetime default current_timestamp,
   traintime       datetime,
   primary key (id),
-  UNIQUE INDEX idx_moduletype (moduletype)
+  UNIQUE INDEX uk_modulename (modulename),
+  INDEX idx_moduletype (moduletype)
 ) engine = innodb default character set utf8mb4 COMMENT = '管网表';
 
 
@@ -101,19 +102,20 @@
   itemname        varchar(50),
   caltypeid       varchar(36),
   itemtypeid      varchar(36),
-  predictlength   decimal(5, 0),
-  granularity     decimal(5, 0),
-  status          decimal(5, 0),
-  isfuse          decimal(5, 0),
-  predictphase    decimal(5, 0),
-  workchecked     decimal(5, 0),
-  unittransfactor decimal(31, 6),
-  create_time     datetime default current_timestamp,
-  update_time     datetime default current_timestamp,
+  predictlength   int,
+  granularity     int,
+  status          tinyint,
+  isfuse          tinyint,
+  predictphase    tinyint,
+  workchecked     tinyint,
+  unittransfactor decimal(16, 6),
+  create_time     datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  update_time     datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
   saveindex       varchar(16),
   primary key (id),
-  UNIQUE INDEX uk_itemno (itemno)
-) engine = innodb default character set utf8mb4 COMMENT = '预测模型结果字符串表';
+  UNIQUE INDEX uk_itemno (itemno),
+  INDEX uk_itemtypeid (itemtypeid)
+) engine = innodb default character set utf8mb4 COMMENT = '预测项表';
 
 create table
   t_mm_predict_merge_item
@@ -483,6 +485,24 @@
 ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '生成代码记录表' ROW_FORMAT = DYNAMIC;
 
 -- ----------------------------
+-- Table structure for t_mpk_model_method
+-- ----------------------------
+DROP TABLE IF EXISTS `t_mpk_model_method`;
+CREATE TABLE `t_mpk_model_method`  (
+                                       `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'id',
+                                       `mpk_file_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '模型文件id',
+                                       `method_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '模型方法名',
+                                       `data_length` int NULL DEFAULT 1 COMMENT '输入个数',
+                                       `model` int NULL DEFAULT 0 COMMENT '是否有model(0:否,1:是)',
+                                       `result_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '结果key',
+                                       `sort`      integer,
+                                       PRIMARY KEY (`id`, `mpk_file_id`) USING BTREE,
+                                       INDEX `id`(`id` ASC) USING BTREE,
+                                       INDEX `idx_method`(`mpk_file_id` ASC) USING BTREE,
+                                       CONSTRAINT `del_method` FOREIGN KEY (`mpk_file_id`) REFERENCES `t_mpk_file` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
 -- Table structure for t_mpk_method_setting
 -- ----------------------------
 DROP TABLE IF EXISTS `t_mpk_method_setting`;
@@ -496,28 +516,28 @@
                                          `value_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '参数类型',
                                          `max` int NULL DEFAULT NULL COMMENT '最大值',
                                          `min` int NULL DEFAULT NULL COMMENT '最小值',
+                                         `sort`      integer,
                                          PRIMARY KEY (`id`, `method_id`) USING BTREE,
                                          INDEX `del_setting`(`method_id` ASC) USING BTREE,
                                          INDEX `id`(`id` ASC) USING BTREE,
                                          CONSTRAINT `del_setting` FOREIGN KEY (`method_id`) REFERENCES `t_mpk_model_method` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
 ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '方法参数关联表' ROW_FORMAT = Dynamic;
 
+
 -- ----------------------------
--- Table structure for t_mpk_model_method
+-- Table structure for t_mpk_setting_select
 -- ----------------------------
-DROP TABLE IF EXISTS `t_mpk_model_method`;
-CREATE TABLE `t_mpk_model_method`  (
-                                       `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'id',
-                                       `mpk_file_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '模型文件id',
-                                       `method_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '模型方法名',
-                                       `data_length` int NULL DEFAULT 1 COMMENT '输入个数',
-                                       `model` int NULL DEFAULT 0 COMMENT '是否有model(0:否,1:是)',
-                                       `result_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '结果key',
-                                       PRIMARY KEY (`id`, `mpk_file_id`) USING BTREE,
-                                       INDEX `id`(`id` ASC) USING BTREE,
-                                       INDEX `del_method`(`mpk_file_id` ASC) USING BTREE,
-                                       CONSTRAINT `del_method` FOREIGN KEY (`mpk_file_id`) REFERENCES `t_mpk_file` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
-) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
+DROP TABLE IF EXISTS `t_mpk_setting_select`;
+CREATE TABLE `t_mpk_setting_select`  (
+                                         `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'id',
+                                         `setting_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '参数id',
+                                         `select_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'key',
+                                         `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '名称',
+                                         `sort`      integer,
+                                         PRIMARY KEY (`id`, `setting_id`) USING BTREE,
+                                         INDEX `del_select`(`setting_id` ASC) USING BTREE,
+                                         CONSTRAINT `del_select` FOREIGN KEY (`setting_id`) REFERENCES `t_mpk_method_setting` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '参数选项关联表' ROW_FORMAT = Dynamic;
 
 -- ----------------------------
 -- Table structure for t_mpk_project
@@ -583,16 +603,29 @@
                                                         CONSTRAINT `del_package_model` FOREIGN KEY (`project_id`) REFERENCES `t_mpk_project` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
 ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '打包历史模型关联表' ROW_FORMAT = Dynamic;
 
--- ----------------------------
--- Table structure for t_mpk_setting_select
--- ----------------------------
-DROP TABLE IF EXISTS `t_mpk_setting_select`;
-CREATE TABLE `t_mpk_setting_select`  (
-                                         `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'id',
-                                         `setting_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '参数id',
-                                         `select_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'key',
-                                         `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '名称',
-                                         PRIMARY KEY (`id`, `setting_id`) USING BTREE,
-                                         INDEX `del_select`(`setting_id` ASC) USING BTREE,
-                                         CONSTRAINT `del_select` FOREIGN KEY (`setting_id`) REFERENCES `t_mpk_method_setting` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
-) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '参数选项关联表' ROW_FORMAT = Dynamic;
\ No newline at end of file
+
+DROP TABLE IF EXISTS `t_mpk_icon`;
+CREATE TABLE `t_mpk_icon`  (
+                                                        `id` varchar(36) NOT NULL COMMENT 'id',
+                                                        `icon_name` varchar(36) NOT NULL COMMENT '图标名称',
+                                                        `icon_desc` varchar(36) DEFAULT NULL COMMENT '图标描述',
+                                                        `sort` integer DEFAULT NULL COMMENT '排序',
+                                                        PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'MDK平台图标' ROW_FORMAT = Dynamic;
+
+DROP TABLE IF EXISTS `t_mpk_file_menu`;
+CREATE TABLE `t_mpk_file_menu`  (
+                               `id` varchar(36) NOT NULL COMMENT 'id',
+                               `name` varchar(36) NOT NULL COMMENT '名称',
+                               `sort` integer DEFAULT NULL COMMENT '排序',
+                               PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '模型文件菜单' ROW_FORMAT = Dynamic;
+
+DROP TABLE IF EXISTS `t_mpk_file_group`;
+CREATE TABLE `t_mpk_file_group`  (
+                                    `id` varchar(36) NOT NULL COMMENT 'id',
+                                    `menu_id` varchar(36) NOT NULL COMMENT '菜单',
+                                    `name` varchar(36) NOT NULL COMMENT '名称',
+                                    `sort` integer DEFAULT NULL COMMENT '排序',
+                                    PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '模型文件分组' ROW_FORMAT = Dynamic;
\ No newline at end of file

--
Gitblit v1.9.3