From ed4f78cccbb2cf672d6b3230069979288232ab4a Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期一, 04 十一月 2024 08:25:28 +0800
Subject: [PATCH] 计划数据

---
 iailab-module-model/iailab-module-model-biz/db/mysql.sql |   26 ++++++++++++++------------
 1 files changed, 14 insertions(+), 12 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 b7c46e2..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

--
Gitblit v1.9.3