From bc0e48b97c64cac5aeb50aca3cdfa7db3a26ae23 Mon Sep 17 00:00:00 2001 From: wanli Date: Wed, 26 Oct 2022 11:16:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=85=AC=E5=8F=B8=E7=9A=84?= =?UTF-8?q?=E8=B3=87=E6=96=99=E8=A1=A8=E4=B8=AD=EF=BC=8C=E8=A3=9C=E4=B8=8A?= =?UTF-8?q?=E7=BC=BA=E5=B0=91=E7=9A=84=E6=AC=84=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SolarPower/Repository/Implement/CompanyRepository.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/SolarPower/Repository/Implement/CompanyRepository.cs b/SolarPower/Repository/Implement/CompanyRepository.cs index 054e337..ff22bf6 100644 --- a/SolarPower/Repository/Implement/CompanyRepository.cs +++ b/SolarPower/Repository/Implement/CompanyRepository.cs @@ -460,6 +460,8 @@ namespace SolarPower.Repository.Implement `Type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '類型', `TypeName` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '類型名稱', `ControllerId` int(10) unsigned DEFAULT NULL COMMENT '控制器Id', + `SensorTypeId` int(10) DEFAULT NULL, + `SensorTypeDetailId` int(10) DEFAULT NULL, `Brand` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '廠牌', `BrandNum` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '廠商序號', `ProductModel` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '型號', @@ -543,7 +545,7 @@ namespace SolarPower.Repository.Implement -- 傾印 資料表 power_station 結構 CREATE TABLE IF NOT EXISTS `power_station` ( - `Id` int(10) unsigned NOT NULL DEFAULT '0', + `Id` int(10) unsigned NOT NULL AUTO_INCREMENT, `Deleted` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否刪除, 0:否 1:是', `CompanyId` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '公司編號', `CityId` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '電站縣市', @@ -599,7 +601,7 @@ namespace SolarPower.Repository.Implement `total_carbon` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '總減碳量', `today_irradiance` decimal(5,2) NOT NULL DEFAULT '0.00' COMMENT '今日日照度', `avg_irradiance` decimal(5,2) NOT NULL DEFAULT '0.00' COMMENT '平均日照度', - `SolarHour` decimal(5,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '總運轉小時', + `SolarHour` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '總運轉小時', `SiteDB` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '電站 DB name: solar_com', `TodayWeather` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '今日天氣', `TodayWeatherTemp` decimal(5,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '今日溫度', @@ -611,7 +613,7 @@ namespace SolarPower.Repository.Implement `CreatedBy` int(10) unsigned NOT NULL COMMENT '建立者', `CreatedAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '建立時間', `UpdatedBy` int(10) unsigned DEFAULT NULL COMMENT '修改者', - `UpdatedAt` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改時間', + `UpdatedAt` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改時間', PRIMARY KEY (`Id`), KEY `IDX_01` (`Deleted`), KEY `IDX_02` (`CompanyId`),