From 1f1376e5f708fd3c1218882b85d431a6ea799200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=AD=E7=9D=BF?= <774114798@qq.com> Date: Tue, 10 Dec 2024 11:25:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E6=9D=BF=E5=8D=A1=E5=B1=A5?= =?UTF-8?q?=E5=8E=86=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BoardCardInfoAppService.cs | 229 +- .../IBoardCardInfoAppService.cs | 12 + .../ProtectionDeviceAppService.cs | 43 +- .../BoardCardInfoDto/EditBoardCardInput.cs | 8 + .../EditProtectionDeviceInfoInput.cs | 9 + .../GeneralInformation/BoardCardHistory.cs | 19 +- .../GeneralInformation/BoardCardInfo.cs | 5 +- .../GeneralInformation/EquipmentInfo.cs | 4 + .../ProtectionDeviceHistory.cs | 30 + ...0241210032229_update_table_v92.Designer.cs | 5425 +++++++++++++++++ .../20241210032229_update_table_v92.cs | 128 + .../Migrations/ISASDbContextModelSnapshot.cs | 30 + src/YunDa.Quick/MigratorForDB/Program.cs | 3 - 13 files changed, 5874 insertions(+), 71 deletions(-) create mode 100644 src/YunDa.Domain/YunDa.ISAS.EntityFrameworkCore/Migrations/20241210032229_update_table_v92.Designer.cs create mode 100644 src/YunDa.Domain/YunDa.ISAS.EntityFrameworkCore/Migrations/20241210032229_update_table_v92.cs diff --git a/src/YunDa.Application/YunDa.ISAS.Application/GeneralInformation/ProtectionDevice/BoardCardDevice/BoardCardInfoAppService.cs b/src/YunDa.Application/YunDa.ISAS.Application/GeneralInformation/ProtectionDevice/BoardCardDevice/BoardCardInfoAppService.cs index 596548b..152bf53 100644 --- a/src/YunDa.Application/YunDa.ISAS.Application/GeneralInformation/ProtectionDevice/BoardCardDevice/BoardCardInfoAppService.cs +++ b/src/YunDa.Application/YunDa.ISAS.Application/GeneralInformation/ProtectionDevice/BoardCardDevice/BoardCardInfoAppService.cs @@ -11,6 +11,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Linq.Dynamic.Core; +using System.Text; using System.Threading.Tasks; using System.Xml.Serialization; using ToolLibrary.LogHelper; @@ -150,7 +151,13 @@ namespace YunDa.ISAS.Application.GeneralInformation var deviceBoardCard = boardCards.FirstOrDefault(t => t.ProtectionDeviceInfoId == protectionDevice.Id&&t.BoardId == input.BoardId); if (deviceBoardCard!=null) { - if (deviceBoardCard.SerialNumber != input.SerialNumber) + if (deviceBoardCard.SerialNumber != input.SerialNumber + || deviceBoardCard.MaintenanceRecord != input.MaintenanceRecord + || deviceBoardCard.VerificationRecords != input.VerificationRecords + || deviceBoardCard.VerificationDate != input.VerificationDate + || deviceBoardCard.VerificationPerson != input.VerificationPerson + || deviceBoardCard.ProductionDate != input.ProductionDate + ) { var deviceBoardCardHistory = _boardCardHistoryRepository.GetAll().Where(t => t.BoardCardInfoId == deviceBoardCard.Id).ToList(); @@ -174,31 +181,50 @@ namespace YunDa.ISAS.Application.GeneralInformation deviceBoardCard.VerificationRecords = input.VerificationRecords; var newjson = JsonConvert.SerializeObject(deviceBoardCard); boardHistory.ContentNewJson = newjson; + // 记录变更内容 + var eventDescription = new StringBuilder(); + // 通过判定每个字段是否发生变化,动态生成描述 + if (deviceBoardCard.SerialNumber != input.SerialNumber) + { + eventDescription.AppendLine($"更换了设备的厂商序列号: {deviceBoardCard.SerialNumber} -> {input.SerialNumber}"); + } + if (deviceBoardCard.MaintenanceRecord != input.MaintenanceRecord) + { + eventDescription.AppendLine($"更新了设备的维修记录: {deviceBoardCard.MaintenanceRecord} -> {input.MaintenanceRecord}"); + } + if (deviceBoardCard.VerificationRecords != input.VerificationRecords) + { + eventDescription.AppendLine($"更改了设备的验证记录: {deviceBoardCard.VerificationRecords} -> {input.VerificationRecords}"); + } + if (deviceBoardCard.VerificationDate != input.VerificationDate) + { + eventDescription.AppendLine($"修改了设备的验证日期: {deviceBoardCard.VerificationDate} -> {input.VerificationDate}"); + } + if (deviceBoardCard.VerificationPerson != input.VerificationPerson) + { + eventDescription.AppendLine($"更新了设备的验证人员: {deviceBoardCard.VerificationPerson} -> {input.VerificationPerson}"); + } + if (deviceBoardCard.ProductionDate != input.ProductionDate) + { + eventDescription.AppendLine($"更改了设备的生产日期: {deviceBoardCard.ProductionDate} -> {input.ProductionDate}"); + } + boardHistory.EventDescription = eventDescription.ToString(); + boardHistory.EventRecordType = EventRecordTypeEnum.Board; + boardHistory.Remark = input.Remark; _boardCardHistoryRepository.Insert(boardHistory); } - } - else - { - _boardCardInfoRepository.Insert(new BoardCardInfo + } + else { - SeqNo = 1, - BoardId=input.BoardId, - SerialNumber=input.SerialNumber, - BoardType=input.BoardType, - ProductionDate=input.ProductionDate, - VerificationDate=input.VerificationDate, - VerificationPerson=input.VerificationPerson, - VerificationRecords=input.VerificationRecords, - ProtectionDeviceInfoId=deviceBoardCard.Id, - }); - //rst.Message = "未找到对应板卡"; + + //rst.Message = "未找到对应板卡"; + } + rst.Flag = true; + } + else + { + rst.Message = "未找到对应装置"; } - rst.Flag = true; - } - else - { - rst.Message = "未找到对应装置"; - } } catch (Exception ex) { @@ -539,60 +565,137 @@ namespace YunDa.ISAS.Application.GeneralInformation try { var boards = _boardCardInfoRepository.GetAll().ToList(); - var devices = _protectionDeviceInfoRepository.GetAll().Where(t=>t.DeviceAddress == input.DeviceAddr).ToList(); + var devices = _protectionDeviceInfoRepository.GetAll().Where(t => t.DeviceAddress == input.DeviceAddr).ToList(); var protectionDeviceTypes = _protectionDeviceTypeRepository.GetAll().ToList(); - if (devices.Count >0) + if (devices.Count > 0) { var device = devices[0]; - device.ProtectionDeviceTypeId = protectionDeviceTypes.FirstOrDefault(t=>t.Model == input.DeviceType)?.Id; - //device.BaselineBoardVersion = input. - var deviceBoards = boards.Where(t => t.ProtectionDeviceInfoId == device.Id); - //保护 - BoardCardInfo cpuCardInfo = deviceBoards.FirstOrDefault(t => t.BoardId == "B01"); - cpuCardInfo.FpgaVersion = input.FpgaVer; - cpuCardInfo.InterfaceDatabaseVersion = input.CommcpuCfgVer; - cpuCardInfo.InterfaceVersion = input.CommcpuVer; - cpuCardInfo.InterfaceChecksum = input.CommcpuCrc; - cpuCardInfo.SystemVersion = input.LinuxVer; - cpuCardInfo.ProtectionChecksum = input.ProtectCrc; - cpuCardInfo.ProtectionDatabaseVersion = input.ProtectCfgVer; - cpuCardInfo.ProtectionVersion = input.ProtectVer; - //液晶 - BoardCardInfo ioyjCardInfo = deviceBoards.FirstOrDefault(t => t.BoardId == "液晶"); - ioyjCardInfo.YjVersion = input.YjVer; - ioyjCardInfo.YjCrc = input.YjCrc; - if (input.IoVersion.Count==5) + device.ProtectionDeviceTypeId = protectionDeviceTypes.FirstOrDefault(t => t.Model == input.DeviceType)?.Id; + + var deviceBoards = boards.Where(t => t.ProtectionDeviceInfoId == device.Id).ToList(); + + // 记录历史数据的方法 + void RecordBoardCardHistory(BoardCardInfo oldCardInfo, BoardCardInfo newCardInfo, string boardId) { - BoardCardInfo io1CardInfo = deviceBoards.FirstOrDefault(t => t.BoardId == "B03"); - io1CardInfo.IOVersion = input.IoVersion[0].IoVer; - io1CardInfo.IOCrc = input.IoVersion[0].IoCrc; + if (oldCardInfo != null && newCardInfo != null) + { + var eventDescription = new StringBuilder(); + var eventRecordType = EventRecordTypeEnum.Software; // 默认修改事件类型 + // 比较各个字段,如果不一致则记录 + if (oldCardInfo.FpgaVersion != newCardInfo.FpgaVersion) + eventDescription.AppendLine($"FPGA版本更改: {oldCardInfo.FpgaVersion} -> {newCardInfo.FpgaVersion}"); + if (oldCardInfo.InterfaceDatabaseVersion != newCardInfo.InterfaceDatabaseVersion) + eventDescription.AppendLine($"接口数据库版本更改: {oldCardInfo.InterfaceDatabaseVersion} -> {newCardInfo.InterfaceDatabaseVersion}"); + if (oldCardInfo.InterfaceVersion != newCardInfo.InterfaceVersion) + eventDescription.AppendLine($"接口版本更改: {oldCardInfo.InterfaceVersion} -> {newCardInfo.InterfaceVersion}"); + if (oldCardInfo.InterfaceChecksum != newCardInfo.InterfaceChecksum) + eventDescription.AppendLine($"接口校验和更改: {oldCardInfo.InterfaceChecksum} -> {newCardInfo.InterfaceChecksum}"); + if (oldCardInfo.SystemVersion != newCardInfo.SystemVersion) + eventDescription.AppendLine($"系统版本更改: {oldCardInfo.SystemVersion} -> {newCardInfo.SystemVersion}"); + if (oldCardInfo.ProtectionChecksum != newCardInfo.ProtectionChecksum) + eventDescription.AppendLine($"保护校验和更改: {oldCardInfo.ProtectionChecksum} -> {newCardInfo.ProtectionChecksum}"); + if (oldCardInfo.ProtectionDatabaseVersion != newCardInfo.ProtectionDatabaseVersion) + eventDescription.AppendLine($"保护数据库版本更改: {oldCardInfo.ProtectionDatabaseVersion} -> {newCardInfo.ProtectionDatabaseVersion}"); + if (oldCardInfo.ProtectionVersion != newCardInfo.ProtectionVersion) + eventDescription.AppendLine($"保护版本更改: {oldCardInfo.ProtectionVersion} -> {newCardInfo.ProtectionVersion}"); + if (oldCardInfo.YjVersion != newCardInfo.YjVersion) + eventDescription.AppendLine($"液晶版本更改: {oldCardInfo.YjVersion} -> {newCardInfo.YjVersion}"); + if (oldCardInfo.YjCrc != newCardInfo.YjCrc) + eventDescription.AppendLine($"液晶CRC更改: {oldCardInfo.YjCrc} -> {newCardInfo.YjCrc}"); - BoardCardInfo io2CardInfo = deviceBoards.FirstOrDefault(t => t.BoardId == "B04"); - io2CardInfo.IOVersion = input.IoVersion[1].IoVer; - io2CardInfo.IOCrc = input.IoVersion[1].IoCrc; + if (eventDescription.Length > 0) + { + var json = JsonConvert.SerializeObject(oldCardInfo); + var newJson = JsonConvert.SerializeObject(newCardInfo); - BoardCardInfo io3CardInfo = deviceBoards.FirstOrDefault(t => t.BoardId == "B05"); - io3CardInfo.IOVersion = input.IoVersion[2].IoVer; - io3CardInfo.IOCrc = input.IoVersion[2].IoCrc; + // 创建历史记录 + var historyRecord = new BoardCardHistory + { + ProtectionDeviceInfoId = device.Id, + BoardCardInfoId = oldCardInfo.Id, + BoardId = boardId, + RecodeDate = DateTime.Now, + ContentJson = json, + ContentNewJson = newJson, + EventDescription = eventDescription.ToString(), + EventRecordType = eventRecordType, + SeqNo = deviceBoards.Count > 0 ? deviceBoards.Max(t => t.SeqNo) + 1 : 1, + IsSend = false // 默认为未发送,您可以根据需要调整 + }; - BoardCardInfo io4CardInfo = deviceBoards.FirstOrDefault(t => t.BoardId == "B06"); - io4CardInfo.IOVersion = input.IoVersion[3].IoVer; - io4CardInfo.IOCrc = input.IoVersion[3].IoCrc; - - BoardCardInfo io5CardInfo = deviceBoards.FirstOrDefault(t => t.BoardId == "B07"); - io5CardInfo.IOVersion = input.IoVersion[4].IoVer; - io5CardInfo.IOCrc = input.IoVersion[4].IoCrc; - - + // 记录历史 + _boardCardHistoryRepository.Insert(historyRecord); + } + } + } + + // 保护板卡 + BoardCardInfo cpuCardInfo = deviceBoards.FirstOrDefault(t => t.BoardId == "B01"); + if (cpuCardInfo != null) + { + var newCpuCardInfo = new BoardCardInfo + { + FpgaVersion = input.FpgaVer, + InterfaceDatabaseVersion = input.CommcpuCfgVer, + InterfaceVersion = input.CommcpuVer, + InterfaceChecksum = input.CommcpuCrc, + SystemVersion = input.LinuxVer, + ProtectionChecksum = input.ProtectCrc, + ProtectionDatabaseVersion = input.ProtectCfgVer, + ProtectionVersion = input.ProtectVer + }; + + RecordBoardCardHistory(cpuCardInfo, newCpuCardInfo, "B01"); + } + + // 液晶板卡 + BoardCardInfo ioyjCardInfo = deviceBoards.FirstOrDefault(t => t.BoardId == "液晶"); + if (ioyjCardInfo != null) + { + var newIoyjCardInfo = new BoardCardInfo + { + YjVersion = input.YjVer, + YjCrc = input.YjCrc + }; + + RecordBoardCardHistory(ioyjCardInfo, newIoyjCardInfo, "液晶"); + } + + // IO板卡 + if (input.IoVersion.Count > 0) + { + var boardIdMap = new Dictionary + { + { "B03", 0 }, + { "B04", 1 }, + { "B05", 2 }, + { "B06", 3 }, + { "B07", 4 } + }; + + foreach (var boardId in boardIdMap.Keys) + { + var boardCardInfo = deviceBoards.FirstOrDefault(t => t.BoardId == boardId); + if (boardCardInfo != null) + { + var ioVersion = input.IoVersion[boardIdMap[boardId]]; + var newIoCardInfo = new BoardCardInfo + { + IOVersion = ioVersion.IoVer, + IOCrc = ioVersion.IoCrc + }; + + RecordBoardCardHistory(boardCardInfo, newIoCardInfo, boardId); + } + } } - } + rst.Flag = true; } catch (Exception ex) { - - + rst.Message = ex.Message; } return rst; } diff --git a/src/YunDa.Application/YunDa.ISAS.Application/GeneralInformation/ProtectionDevice/BoardCardDevice/IBoardCardInfoAppService.cs b/src/YunDa.Application/YunDa.ISAS.Application/GeneralInformation/ProtectionDevice/BoardCardDevice/IBoardCardInfoAppService.cs index d7ee4b5..508012e 100644 --- a/src/YunDa.Application/YunDa.ISAS.Application/GeneralInformation/ProtectionDevice/BoardCardDevice/IBoardCardInfoAppService.cs +++ b/src/YunDa.Application/YunDa.ISAS.Application/GeneralInformation/ProtectionDevice/BoardCardDevice/IBoardCardInfoAppService.cs @@ -6,6 +6,7 @@ using YunDa.ISAS.DataTransferObject; using YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoDto; using YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoDto.HistoryData; using YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoDto.SearchCondition; +using YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionSettingDto; namespace YunDa.ISAS.Application.GeneralInformation { @@ -24,5 +25,16 @@ namespace YunDa.ISAS.Application.GeneralInformation /// /// Task>> GetBoardStateInfo(Guid equipmentId, Guid deviceId); + /// + /// 扫码枪输入设备信息 + /// + /// + /// + RequestEasyResult ScanDeviceQRCode(EditBoardCardQrCodeInput input); + /// + /// 更新版本信息 + /// + /// + RequestEasyResult ModifyBoardInfoList(ProtectionDeviceVersionInfo input); } } diff --git a/src/YunDa.Application/YunDa.ISAS.Application/GeneralInformation/ProtectionDevice/ProtectionDeviceAppService.cs b/src/YunDa.Application/YunDa.ISAS.Application/GeneralInformation/ProtectionDevice/ProtectionDeviceAppService.cs index d445caa..e073980 100644 --- a/src/YunDa.Application/YunDa.ISAS.Application/GeneralInformation/ProtectionDevice/ProtectionDeviceAppService.cs +++ b/src/YunDa.Application/YunDa.ISAS.Application/GeneralInformation/ProtectionDevice/ProtectionDeviceAppService.cs @@ -10,6 +10,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Linq.Dynamic.Core; +using System.Text; using System.Threading.Tasks; using ToolLibrary.LogHelper; using YunDa.ISAS.Application.Core; @@ -201,7 +202,13 @@ namespace YunDa.ISAS.Application.GeneralInformation if (protectionDevice != null) { //当出厂编号不一致进行履历更新 - if (protectionDevice.EquipmentInfo.FactorySerialNumber != input.SerialNumber) + if (protectionDevice.EquipmentInfo.FactorySerialNumber != input.SerialNumber + || protectionDevice.EquipmentInfo.MaintenanceRecord!= input.MaintenanceRecord + || protectionDevice.EquipmentInfo.VerificationRecords != input.VerificationRecords + || protectionDevice.EquipmentInfo.VerificationDate != input.VerificationDate + || protectionDevice.EquipmentInfo.VerificationPerson!= input.VerificationPerson + || protectionDevice.EquipmentInfo.ProductionDate != input.ProductionDate + ) { var json = JsonConvert.SerializeObject(protectionDevice); var protectionDeviceHistory = _protectionDeviceHistoryRepository.GetAll().Where(t => t.ProtectionDeviceInfoId == protectionDevice.Id).ToList(); @@ -223,8 +230,38 @@ namespace YunDa.ISAS.Application.GeneralInformation protectionDevice.EquipmentInfo.VerificationRecords = input.VerificationRecords; var newjson = JsonConvert.SerializeObject(protectionDevice); deviceHistory.ContentNewJson = newjson; - _protectionDeviceHistoryRepository.Insert(deviceHistory); + // 记录变更内容 + var eventDescription = new StringBuilder(); + // 通过判定每个字段是否发生变化,动态生成描述 + if (protectionDevice.EquipmentInfo.FactorySerialNumber != input.SerialNumber) + { + eventDescription.AppendLine($"更换了设备的厂商序列号: {protectionDevice.EquipmentInfo.FactorySerialNumber} -> {input.SerialNumber}"); + } + if (protectionDevice.EquipmentInfo.MaintenanceRecord != input.MaintenanceRecord) + { + eventDescription.AppendLine($"更新了设备的维修记录: {protectionDevice.EquipmentInfo.MaintenanceRecord} -> {input.MaintenanceRecord}"); + } + if (protectionDevice.EquipmentInfo.VerificationRecords != input.VerificationRecords) + { + eventDescription.AppendLine($"更改了设备的检验记录: {protectionDevice.EquipmentInfo.VerificationRecords} -> {input.VerificationRecords}"); + } + if (protectionDevice.EquipmentInfo.VerificationDate != input.VerificationDate) + { + eventDescription.AppendLine($"修改了设备的检验日期: {protectionDevice.EquipmentInfo.VerificationDate} -> {input.VerificationDate}"); + } + if (protectionDevice.EquipmentInfo.VerificationPerson != input.VerificationPerson) + { + eventDescription.AppendLine($"更新了设备的检验人员: {protectionDevice.EquipmentInfo.VerificationPerson} -> {input.VerificationPerson}"); + } + if (protectionDevice.EquipmentInfo.ProductionDate != input.ProductionDate) + { + eventDescription.AppendLine($"更改了设备的生产日期: {protectionDevice.EquipmentInfo.ProductionDate} -> {input.ProductionDate}"); + } + deviceHistory.EventDescription = eventDescription.ToString(); + deviceHistory.EventRecordType = EventRecordTypeEnum.Device; + deviceHistory.Remark = input.Remark; + _protectionDeviceHistoryRepository.Insert(deviceHistory); } rst.Flag = true; } @@ -236,7 +273,7 @@ namespace YunDa.ISAS.Application.GeneralInformation } catch (Exception ex) { - throw; + rst.Message = ex.Message; } return rst; diff --git a/src/YunDa.Application/YunDa.ISAS.DataTransferObject/GeneralInformation/ProtectionDeviceInfoDto/BoardCardInfoDto/EditBoardCardInput.cs b/src/YunDa.Application/YunDa.ISAS.DataTransferObject/GeneralInformation/ProtectionDeviceInfoDto/BoardCardInfoDto/EditBoardCardInput.cs index cd3bfa8..31dbc24 100644 --- a/src/YunDa.Application/YunDa.ISAS.DataTransferObject/GeneralInformation/ProtectionDeviceInfoDto/BoardCardInfoDto/EditBoardCardInput.cs +++ b/src/YunDa.Application/YunDa.ISAS.DataTransferObject/GeneralInformation/ProtectionDeviceInfoDto/BoardCardInfoDto/EditBoardCardInput.cs @@ -118,6 +118,14 @@ namespace YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoD /// 检验记录 /// public virtual string VerificationRecords { get; set; } + /// + /// 维修记录,用字符串来表示,可记录关于维修相关的文字描述等信息 + /// + public virtual string MaintenanceRecord { get; set; } + /// + /// 备注 + /// + public virtual string Remark { get; set; } } } diff --git a/src/YunDa.Application/YunDa.ISAS.DataTransferObject/GeneralInformation/ProtectionDeviceInfoDto/EditProtectionDeviceInfoInput.cs b/src/YunDa.Application/YunDa.ISAS.DataTransferObject/GeneralInformation/ProtectionDeviceInfoDto/EditProtectionDeviceInfoInput.cs index b0af1a3..9052287 100644 --- a/src/YunDa.Application/YunDa.ISAS.DataTransferObject/GeneralInformation/ProtectionDeviceInfoDto/EditProtectionDeviceInfoInput.cs +++ b/src/YunDa.Application/YunDa.ISAS.DataTransferObject/GeneralInformation/ProtectionDeviceInfoDto/EditProtectionDeviceInfoInput.cs @@ -113,6 +113,15 @@ namespace YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoD /// 检验记录 /// public virtual string VerificationRecords { get; set; } + /// + /// 维修记录 + /// + public virtual string MaintenanceRecord { get; set; } + /// + /// 备注 + /// + public virtual string Remark { get; set; } + } public class EditProtectionQrCodeBoardCardInput diff --git a/src/YunDa.Domain/YunDa.ISAS.Entities/GeneralInformation/BoardCardHistory.cs b/src/YunDa.Domain/YunDa.ISAS.Entities/GeneralInformation/BoardCardHistory.cs index 23424c6..12a31c2 100644 --- a/src/YunDa.Domain/YunDa.ISAS.Entities/GeneralInformation/BoardCardHistory.cs +++ b/src/YunDa.Domain/YunDa.ISAS.Entities/GeneralInformation/BoardCardHistory.cs @@ -40,8 +40,25 @@ namespace YunDa.SOMS.Entities.GeneralInformation /// 更换后数据 /// public virtual string ContentNewJson { get; set; } + /// - /// baohuzhuangzhi ID + /// 事件描述 + /// + public virtual string EventDescription { get; set; } + /// + /// 事件类型 + /// + public virtual EventRecordTypeEnum EventRecordType { get; set; } + /// + /// 备注 + /// + public virtual string Remark { get; set; } + /// + /// 是否已经发送给主站 + /// + public virtual bool IsSend { get; set; } + /// + /// 保护装置 ID /// public virtual Guid? ProtectionDeviceInfoId { get; set; } diff --git a/src/YunDa.Domain/YunDa.ISAS.Entities/GeneralInformation/BoardCardInfo.cs b/src/YunDa.Domain/YunDa.ISAS.Entities/GeneralInformation/BoardCardInfo.cs index 4c04a51..e22266f 100644 --- a/src/YunDa.Domain/YunDa.ISAS.Entities/GeneralInformation/BoardCardInfo.cs +++ b/src/YunDa.Domain/YunDa.ISAS.Entities/GeneralInformation/BoardCardInfo.cs @@ -96,7 +96,10 @@ namespace YunDa.SOMS.Entities.GeneralInformation /// 检验记录 /// public virtual string VerificationRecords { get; set; } - + /// + /// 维修记录,用字符串来表示,可记录关于维修相关的文字描述等信息 + /// + public virtual string MaintenanceRecord { get; set; } /// /// 备注 /// diff --git a/src/YunDa.Domain/YunDa.ISAS.Entities/GeneralInformation/EquipmentInfo.cs b/src/YunDa.Domain/YunDa.ISAS.Entities/GeneralInformation/EquipmentInfo.cs index 5bdd98b..62afbf3 100644 --- a/src/YunDa.Domain/YunDa.ISAS.Entities/GeneralInformation/EquipmentInfo.cs +++ b/src/YunDa.Domain/YunDa.ISAS.Entities/GeneralInformation/EquipmentInfo.cs @@ -58,6 +58,10 @@ namespace YunDa.ISAS.Entities.GeneralInformation /// public virtual DateTime? ProductionDate { get; set; } /// + /// 维修记录,用字符串来表示,可记录关于维修相关的文字描述等信息 + /// + public virtual string MaintenanceRecord { get; set; } + /// /// 检验人员 /// public virtual string VerificationPerson { get; set; } diff --git a/src/YunDa.Domain/YunDa.ISAS.Entities/GeneralInformation/ProtectionDeviceHistory.cs b/src/YunDa.Domain/YunDa.ISAS.Entities/GeneralInformation/ProtectionDeviceHistory.cs index 2ea03df..e71e5e1 100644 --- a/src/YunDa.Domain/YunDa.ISAS.Entities/GeneralInformation/ProtectionDeviceHistory.cs +++ b/src/YunDa.Domain/YunDa.ISAS.Entities/GeneralInformation/ProtectionDeviceHistory.cs @@ -46,9 +46,39 @@ namespace YunDa.SOMS.Entities.GeneralInformation /// public virtual string ContentNewJson { get; set; } /// + /// 事件描述 + /// + public virtual string EventDescription { get; set; } + /// + /// 事件类型 + /// + public virtual EventRecordTypeEnum EventRecordType { get; set; } + /// + /// 备注 + /// + public virtual string Remark { get; set; } + /// /// 是否已经发送给主站 /// public virtual bool IsSend { get; set; } } + + public enum EventRecordTypeEnum + { + None = 0, + /// + /// 装置 + /// + Device =1, + /// + /// 板卡 + /// + Board =2, + + /// + /// 软件版本 + /// + Software =3 + } } diff --git a/src/YunDa.Domain/YunDa.ISAS.EntityFrameworkCore/Migrations/20241210032229_update_table_v92.Designer.cs b/src/YunDa.Domain/YunDa.ISAS.EntityFrameworkCore/Migrations/20241210032229_update_table_v92.Designer.cs new file mode 100644 index 0000000..24708d4 --- /dev/null +++ b/src/YunDa.Domain/YunDa.ISAS.EntityFrameworkCore/Migrations/20241210032229_update_table_v92.Designer.cs @@ -0,0 +1,5425 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using YunDa.ISAS.EntityFrameworkCore.EntityFrameworkCore; + +#nullable disable + +namespace YunDa.ISAS.Migrations +{ + [DbContext(typeof(ISASDbContext))] + [Migration("20241210032229_update_table_v92")] + partial class update_table_v92 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.11") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("YunDa.ISAS.Entities.ClientConfiguration.ThreeDimension.CCThreeDimension", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("EquipmentInfoId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("ModelId") + .HasColumnType("int"); + + b.Property("ModelName") + .HasColumnType("longtext"); + + b.Property("TelecommandConfigurationId") + .HasColumnType("char(36)"); + + b.Property("TelemeteringConfigurationId") + .HasColumnType("char(36)"); + + b.Property("TelesignalisationConfigurationId") + .HasColumnType("char(36)"); + + b.Property("ThreeDimensionDataCategory") + .HasColumnType("int"); + + b.Property("TransformerSubstationId") + .HasColumnType("char(36)"); + + b.Property("VideoDevId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("EquipmentInfoId"); + + b.HasIndex("TelecommandConfigurationId"); + + b.HasIndex("TelemeteringConfigurationId"); + + b.HasIndex("TelesignalisationConfigurationId"); + + b.HasIndex("TransformerSubstationId"); + + b.HasIndex("VideoDevId"); + + b.ToTable("cc_three_dimension"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.DataMonitoring.MultidimensionalCheck", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("EquipmentInfoId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PatternRecognitionConfigutrationId1") + .HasColumnType("char(36)"); + + b.Property("PatternRecognitionConfigutrationId2") + .HasColumnType("char(36)"); + + b.Property("PresetPointId1") + .HasColumnType("char(36)"); + + b.Property("PresetPointId2") + .HasColumnType("char(36)"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("TelesignalisationConfigurationId") + .HasColumnType("char(36)"); + + b.Property("TransformerSubstationId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("EquipmentInfoId"); + + b.HasIndex("PatternRecognitionConfigutrationId1"); + + b.HasIndex("PatternRecognitionConfigutrationId2"); + + b.HasIndex("PresetPointId1"); + + b.HasIndex("PresetPointId2"); + + b.HasIndex("TelesignalisationConfigurationId"); + + b.HasIndex("TransformerSubstationId"); + + b.ToTable("dm_multidimensional_check"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.DataMonitoring.MultidimensionalCheckSchedule", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("EndTime") + .HasColumnType("longtext"); + + b.Property("IntervalMinute") + .HasColumnType("int"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("StartTime") + .HasColumnType("longtext"); + + b.Property("Week") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("dm_multidimensional_check_schedule"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.DataMonitoring.SelfCheckingConfiguration", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("DataType") + .HasColumnType("int"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("JudgmentMode") + .HasColumnType("int"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("LowerLimit") + .HasColumnType("float"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("RepetitiveDisplacementTimes") + .HasColumnType("int"); + + b.Property("RepetitiveSendTimes") + .HasColumnType("int"); + + b.Property("SendTelemeteringValue") + .HasColumnType("float"); + + b.Property("SendTelesignalisationValue") + .HasColumnType("int"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("TimeOfJudgment") + .HasColumnType("int"); + + b.Property("TransformerSubstationId") + .HasColumnType("char(36)"); + + b.Property("UpperLimit") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.HasIndex("TransformerSubstationId"); + + b.ToTable("dm_self_checking_configuration"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.DataMonitoring.TeleCommandPlanSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Remark") + .HasColumnType("longtext"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("TransformerSubstationId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TransformerSubstationId"); + + b.ToTable("dm_telecommand_plan_setting"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.DataMonitoring.TeleCommandPlanTime", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ByDays") + .HasColumnType("longtext"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("Freq") + .HasColumnType("int"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("Remark") + .HasColumnType("longtext"); + + b.Property("SendTelecommandTime") + .HasColumnType("datetime(6)"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("StartTime") + .HasColumnType("datetime(6)"); + + b.Property("TeleCommandPlanSettingId") + .HasColumnType("char(36)"); + + b.Property("TransformerSubstationId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TeleCommandPlanSettingId"); + + b.HasIndex("TransformerSubstationId"); + + b.ToTable("dm_telecommand_plan_time"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.DataMonitoring.TeleCommandSettingItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("Remark") + .HasColumnType("longtext"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("TeleCommandPlanSettingId") + .HasColumnType("char(36)"); + + b.Property("TeleCommandValue") + .HasColumnType("int"); + + b.Property("TelecommandConfigurationId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TeleCommandPlanSettingId"); + + b.HasIndex("TelecommandConfigurationId"); + + b.ToTable("dm_telecommand_setting_item"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.DataMonitoring.TelecommandConfiguration", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CPUSector") + .HasColumnType("int"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("DataSourceCategory") + .HasColumnType("int"); + + b.Property("DeviceAddress") + .HasColumnType("int"); + + b.Property("DispatcherAddress") + .HasColumnType("int"); + + b.Property("EquipmentInfoId") + .HasColumnType("char(36)"); + + b.Property("EquipmentTypeId") + .HasColumnType("char(36)"); + + b.Property("InfoAddress") + .HasColumnType("int"); + + b.Property("InfoCPUSector") + .HasColumnType("int"); + + b.Property("InfoDeviceAddress") + .HasColumnType("int"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsSave") + .HasColumnType("tinyint(1)"); + + b.Property("IsSendDispatcher") + .HasColumnType("tinyint(1)"); + + b.Property("IsVirtualDevice") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisible") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("NoContent") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("RelatedTelesignalisationId") + .HasColumnType("char(36)"); + + b.Property("RemoteType") + .HasColumnType("int"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("TransformerSubstationId") + .HasColumnType("char(36)"); + + b.Property("UnsurenessContent") + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("YesContent") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.HasKey("Id"); + + b.HasIndex("EquipmentInfoId"); + + b.HasIndex("EquipmentTypeId"); + + b.HasIndex("RelatedTelesignalisationId"); + + b.HasIndex("TransformerSubstationId"); + + b.ToTable("dm_telecommand_configuration"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.DataMonitoring.TelecommandTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("EquipmentTypeId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsSave") + .HasColumnType("tinyint(1)"); + + b.Property("IsSendDispatcher") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisible") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("NoContent") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("RelatedTelesignalisationId") + .HasColumnType("char(36)"); + + b.Property("RemoteType") + .HasColumnType("int"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("UnsurenessContent") + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("YesContent") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.HasKey("Id"); + + b.HasIndex("EquipmentTypeId"); + + b.ToTable("dm_telecommand_template"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.DataMonitoring.TelemeteringAlarmTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("DMAlarmCategoryId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("MaxValue") + .HasColumnType("float"); + + b.Property("MinValue") + .HasColumnType("float"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("TelemeteringTemplateId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DMAlarmCategoryId"); + + b.HasIndex("TelemeteringTemplateId"); + + b.ToTable("dm_telemetering_alarm_template"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.DataMonitoring.TelemeteringConfiguration", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CPUSector") + .HasColumnType("int"); + + b.Property("Coefficient") + .HasColumnType("float"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("DataSourceCategory") + .HasColumnType("int"); + + b.Property("DecimalDigits") + .HasColumnType("int"); + + b.Property("DeviceAddress") + .HasColumnType("int"); + + b.Property("DispatcherAddress") + .HasColumnType("int"); + + b.Property("EquipmentInfoId") + .HasColumnType("char(36)"); + + b.Property("EquipmentTypeId") + .HasColumnType("char(36)"); + + b.Property("InfoAddress") + .HasColumnType("int"); + + b.Property("InfoCPUSector") + .HasColumnType("int"); + + b.Property("InfoDeviceAddress") + .HasColumnType("int"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsEnvironmentTemp") + .HasColumnType("tinyint(1)"); + + b.Property("IsSave") + .HasColumnType("tinyint(1)"); + + b.Property("IsSelfCheckingValue") + .HasColumnType("tinyint(1)"); + + b.Property("IsSendDispatcher") + .HasColumnType("tinyint(1)"); + + b.Property("IsVirtualDevice") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisible") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("LowerLimit") + .HasColumnType("float"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("SelfCheckingConfigurationId") + .HasColumnType("char(36)"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("TransformerSubstationId") + .HasColumnType("char(36)"); + + b.Property("Unit") + .HasColumnType("longtext"); + + b.Property("UpperLimit") + .HasColumnType("float"); + + b.Property("ismsbaseYCId") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("EquipmentInfoId"); + + b.HasIndex("EquipmentTypeId"); + + b.HasIndex("SelfCheckingConfigurationId"); + + b.HasIndex("TransformerSubstationId"); + + b.ToTable("dm_telemetering_Configuration"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.DataMonitoring.TelemeteringTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Coefficient") + .HasColumnType("float"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("DecimalDigits") + .HasColumnType("int"); + + b.Property("EquipmentTypeId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsSave") + .HasColumnType("tinyint(1)"); + + b.Property("IsSendDispatcher") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisible") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("Unit") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("EquipmentTypeId"); + + b.ToTable("dm_telemetering_template"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.DataMonitoring.TelesignalisationConfiguration", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CPUSector") + .HasColumnType("int"); + + b.Property("CommValue") + .HasColumnType("int"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("DMAlarmCategoryId") + .HasColumnType("char(36)"); + + b.Property("DataSourceCategory") + .HasColumnType("int"); + + b.Property("DeviceAddress") + .HasColumnType("int"); + + b.Property("DispatcherAddress") + .HasColumnType("int"); + + b.Property("EquipmentInfoId") + .HasColumnType("char(36)"); + + b.Property("EquipmentTypeId") + .HasColumnType("char(36)"); + + b.Property("InfoAddress") + .HasColumnType("int"); + + b.Property("InfoCPUSector") + .HasColumnType("int"); + + b.Property("InfoDeviceAddress") + .HasColumnType("int"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsCommStatus") + .HasColumnType("tinyint(1)"); + + b.Property("IsSave") + .HasColumnType("tinyint(1)"); + + b.Property("IsSelfCheckingValue") + .HasColumnType("tinyint(1)"); + + b.Property("IsSendDispatcher") + .HasColumnType("tinyint(1)"); + + b.Property("IsVirtualDevice") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisible") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("NoContent") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("RemoteType") + .HasColumnType("int"); + + b.Property("SelfCheckingConfigurationId") + .HasColumnType("char(36)"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("TransformerSubstationId") + .HasColumnType("char(36)"); + + b.Property("UnsurenessContent") + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("YesContent") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("ismsbaseYXId") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("DMAlarmCategoryId"); + + b.HasIndex("EquipmentInfoId"); + + b.HasIndex("EquipmentTypeId"); + + b.HasIndex("SelfCheckingConfigurationId"); + + b.HasIndex("TransformerSubstationId"); + + b.ToTable("dm_telesignalisation_configuration"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.DataMonitoring.TelesignalisationTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CommValue") + .HasColumnType("int"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("DMAlarmCategoryId") + .HasColumnType("char(36)"); + + b.Property("EquipmentTypeId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsCommStatus") + .HasColumnType("tinyint(1)"); + + b.Property("IsSave") + .HasColumnType("tinyint(1)"); + + b.Property("IsSendDispatcher") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisible") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("NoContent") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("RemoteType") + .HasColumnType("int"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("UnsurenessContent") + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("YesContent") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.HasKey("Id"); + + b.HasIndex("DMAlarmCategoryId"); + + b.HasIndex("EquipmentTypeId"); + + b.ToTable("dm_telesignalisation_template"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.Foundation.NameDateText", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Content") + .HasMaxLength(65535) + .HasColumnType("longtext"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("TransformerSubstationId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TransformerSubstationId"); + + b.ToTable("fd_name_date_text"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.GeneralInformation.EquipmentDataCategory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("DataSourceCategory") + .HasColumnType("int"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("EquipmentTypeId") + .HasColumnType("char(36)"); + + b.Property("Icon") + .HasColumnType("longtext"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("TransformerSubstationId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("EquipmentTypeId"); + + b.HasIndex("TransformerSubstationId"); + + b.ToTable("gi_equipment_data_category"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.GeneralInformation.EquipmentDataCategoryExactly", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("EquipmentDataCategoryId") + .HasColumnType("char(36)"); + + b.Property("EquipmentInfoId") + .HasColumnType("char(36)"); + + b.Property("EquipmentTypeId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("Remark") + .HasColumnType("longtext"); + + b.Property("TransformerSubstationId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("EquipmentDataCategoryId"); + + b.HasIndex("EquipmentInfoId"); + + b.HasIndex("EquipmentTypeId"); + + b.HasIndex("TransformerSubstationId"); + + b.ToTable("gi_equipment_data_category_exactly"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.GeneralInformation.EquipmentInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("BelongEquipmentInfoId") + .HasColumnType("char(36)"); + + b.Property("Code") + .HasColumnType("longtext"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("EquipmentTypeId") + .HasColumnType("char(36)"); + + b.Property("FactorySerialNumber") + .HasColumnType("longtext"); + + b.Property("InstallationArea") + .HasMaxLength(40) + .HasColumnType("varchar(40)"); + + b.Property("InstallationDate") + .HasColumnType("datetime(6)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsRemoteControl") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("MaintenanceRecord") + .HasColumnType("longtext"); + + b.Property("ManufacturerInfoId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("PostionDescription") + .HasMaxLength(40) + .HasColumnType("varchar(40)"); + + b.Property("ProductionDate") + .HasColumnType("datetime(6)"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("RunNumber") + .HasMaxLength(40) + .HasColumnType("varchar(40)"); + + b.Property("SafetyPlanStateType") + .HasColumnType("int"); + + b.Property("SafetyPlanTime") + .HasColumnType("datetime(6)"); + + b.Property("SafetyStateType") + .HasColumnType("int"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("TransformerSubstationId") + .HasColumnType("char(36)"); + + b.Property("VerificationDate") + .HasColumnType("longtext"); + + b.Property("VerificationPerson") + .HasColumnType("longtext"); + + b.Property("VerificationRecords") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("BelongEquipmentInfoId"); + + b.HasIndex("EquipmentTypeId"); + + b.HasIndex("ManufacturerInfoId"); + + b.HasIndex("TransformerSubstationId"); + + b.ToTable("gi_equipment_info"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.GeneralInformation.EquipmentLinkTeledata", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("DataEquipmentInfoId") + .HasColumnType("char(36)"); + + b.Property("EquipmentDataCategoryExactlyId") + .HasColumnType("char(36)"); + + b.Property("EquipmentInfoId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisable") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("TeleDataProperty") + .HasColumnType("int"); + + b.Property("TelemeteringConfigurationId") + .HasColumnType("char(36)"); + + b.Property("TelesignalisationConfigurationId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DataEquipmentInfoId"); + + b.HasIndex("EquipmentDataCategoryExactlyId"); + + b.HasIndex("EquipmentInfoId"); + + b.HasIndex("TelemeteringConfigurationId"); + + b.HasIndex("TelesignalisationConfigurationId"); + + b.ToTable("gi_equipment_link_Teledata"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.GeneralInformation.EquipmentLocation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("gi_equipment_location"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.GeneralInformation.EquipmentType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("EquipmentTypeId") + .HasColumnType("char(36)"); + + b.Property("EquipmentTypeLevel") + .HasColumnType("int"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("gi_equipment_type"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.GeneralInformation.EquipmentTypeViewPoint", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("EquipmentTypeId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("EquipmentTypeId"); + + b.ToTable("gi_equipment_type_view_point"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.GeneralInformation.EquipmentViewPoint", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("EquipmentInfoId") + .HasColumnType("char(36)"); + + b.Property("EquipmentTypeViewPointId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("TransformerSubstationId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("EquipmentInfoId"); + + b.HasIndex("EquipmentTypeViewPointId"); + + b.HasIndex("TransformerSubstationId"); + + b.ToTable("gi_equipment_view_point"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.GeneralInformation.ManufacturerInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("DeleterUserId") + .HasColumnType("char(36)"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)"); + + b.Property("EmailAddress") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsDeleted") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("ManufacturerAddress") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("ManufacturerCode") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("ManufacturerName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("PhoneNumber") + .HasMaxLength(29) + .HasColumnType("varchar(29)"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.ToTable("gi_manufacturer_info"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.GeneralInformation.MasterStation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("MasterStationAddress") + .HasMaxLength(250) + .HasColumnType("varchar(250)"); + + b.Property("MasterStationIp") + .HasMaxLength(250) + .HasColumnType("varchar(250)"); + + b.Property("MasterStationLevel") + .HasColumnType("int"); + + b.Property("MasterStationPort") + .HasColumnType("int"); + + b.Property("MasterStationType") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("gi_master_station"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.GeneralInformation.PowerSupplyLine", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("LineName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.ToTable("gi_power_supply_line"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.GeneralInformation.SubMasterStationRelation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("MasterStationId") + .HasColumnType("char(36)"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("TransformerSubstationId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("MasterStationId"); + + b.HasIndex("TransformerSubstationId"); + + b.ToTable("gi_submasterstation_relation"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.GeneralInformation.TransformerSubstation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CommMgrIP") + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("DataMonitoringAddress") + .HasMaxLength(250) + .HasColumnType("varchar(250)"); + + b.Property("ExternalCommAddress") + .HasMaxLength(250) + .HasColumnType("varchar(250)"); + + b.Property("Iec104ServerUrl") + .HasMaxLength(250) + .HasColumnType("varchar(250)"); + + b.Property("InspectionServiceBaseUrl") + .HasMaxLength(250) + .HasColumnType("varchar(250)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("Latitude") + .HasColumnType("double"); + + b.Property("Longitude") + .HasColumnType("double"); + + b.Property("MasterStationAddress") + .HasMaxLength(250) + .HasColumnType("varchar(250)"); + + b.Property("MasterStationType") + .HasColumnType("int"); + + b.Property("PowerSupplyLineId") + .HasColumnType("char(36)"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("RobotServerAddress") + .HasMaxLength(250) + .HasColumnType("varchar(250)"); + + b.Property("RobotServiceBaseUrl") + .HasMaxLength(250) + .HasColumnType("varchar(250)"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("SubstationName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.HasKey("Id"); + + b.HasIndex("PowerSupplyLineId"); + + b.ToTable("gi_transformer_substation"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.MobileSurveillance.RobotDeviceInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AppearanceType") + .HasMaxLength(10) + .HasColumnType("varchar(10)"); + + b.Property("BayId") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("BayName") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("DeviceId") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("DeviceLevel") + .HasColumnType("int"); + + b.Property("DeviceName") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("DeviceType") + .HasMaxLength(10) + .HasColumnType("varchar(10)"); + + b.Property("FeverType") + .HasMaxLength(10) + .HasColumnType("varchar(10)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("MainDeviceId") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("MainDeviceName") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("MeterType") + .HasMaxLength(10) + .HasColumnType("varchar(10)"); + + b.Property("Phase") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("PresetPointId") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PresetPointName") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("RecognitionTypeList") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("RobotInfoId") + .HasColumnType("char(36)"); + + b.Property("RobotTaskId") + .HasColumnType("char(36)"); + + b.Property("SaveTypeList") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("VoltageLevel") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.HasKey("Id"); + + b.HasIndex("RobotInfoId"); + + b.HasIndex("RobotTaskId"); + + b.ToTable("ms_robot_device_info"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.MobileSurveillance.RobotInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("GeneralCameraId") + .HasColumnType("char(36)"); + + b.Property("IP") + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("InfraredCameraId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("ManufacturerInfoId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Port") + .HasColumnType("int"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("RobotType") + .HasColumnType("int"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("TransformerSubstationId") + .HasColumnType("char(36)"); + + b.Property("Url") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("GeneralCameraId"); + + b.HasIndex("InfraredCameraId"); + + b.HasIndex("ManufacturerInfoId"); + + b.HasIndex("TransformerSubstationId"); + + b.ToTable("ms_robot_info"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.MobileSurveillance.RobotTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("CycleExecuteTime") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CycleWeek") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("DeviceLevel") + .HasColumnType("int"); + + b.Property("DeviceList") + .HasColumnType("longtext"); + + b.Property("FixedStartTime") + .HasColumnType("datetime(6)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsIssue") + .HasColumnType("tinyint(1)"); + + b.Property("IsTemp") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("MasterStationId") + .HasColumnType("char(36)"); + + b.Property("Name") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Priority") + .HasColumnType("int"); + + b.Property("RobotAction") + .HasColumnType("int"); + + b.Property("RobotInfoId") + .HasColumnType("char(36)"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("TaskId") + .HasColumnType("longtext"); + + b.Property("TempId") + .HasColumnType("longtext"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("MasterStationId"); + + b.HasIndex("RobotInfoId"); + + b.ToTable("ms_robot_task"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.MobileSurveillance.RobotTaskItemLink", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("RobotDeviceInfoId") + .HasColumnType("char(36)"); + + b.Property("RobotTaskId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("RobotDeviceInfoId"); + + b.HasIndex("RobotTaskId"); + + b.ToTable("ms_robot_task_item_link"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.MySQL.DataMonitoring.DMAlarmCategory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Color") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("Ico") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.HasKey("Id"); + + b.ToTable("dm_alarm_category"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.MySQL.DataMonitoring.LinkageCondition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CameraAuthenticationId") + .HasColumnType("char(36)"); + + b.Property("CompareType") + .HasColumnType("int"); + + b.Property("ComparisonValue") + .HasColumnType("float"); + + b.Property("ConditionType") + .HasColumnType("int"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("DeterminationTime") + .HasColumnType("datetime(6)"); + + b.Property("EquipmentInfoId") + .HasColumnType("char(36)"); + + b.Property("EquipmentTypeId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("LinkageStrategyId") + .HasColumnType("char(36)"); + + b.Property("LogicalOperator") + .HasColumnType("longtext"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("TelemeteringConfigurationId") + .HasColumnType("char(36)"); + + b.Property("TelesignalisationConfigurationId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("CameraAuthenticationId"); + + b.HasIndex("EquipmentInfoId"); + + b.HasIndex("EquipmentTypeId"); + + b.HasIndex("LinkageStrategyId"); + + b.HasIndex("TelemeteringConfigurationId"); + + b.HasIndex("TelesignalisationConfigurationId"); + + b.ToTable("dm_linkage_condition"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.MySQL.DataMonitoring.LinkageExecuteActivity", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ActivityType") + .HasColumnType("int"); + + b.Property("CameraAuthenticationId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("EquipmentInfoId") + .HasColumnType("char(36)"); + + b.Property("EquipmentTypeId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsCapturePicture") + .HasColumnType("tinyint(1)"); + + b.Property("IsRecordVideo") + .HasColumnType("tinyint(1)"); + + b.Property("KeepTime") + .HasColumnType("int"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("LinkageStrategyId") + .HasColumnType("char(36)"); + + b.Property("PresetPointId") + .HasColumnType("char(36)"); + + b.Property("RecordDuration") + .HasColumnType("int"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("TelecommandConfigurationId") + .HasColumnType("char(36)"); + + b.Property("TelecommandValue") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CameraAuthenticationId"); + + b.HasIndex("EquipmentInfoId"); + + b.HasIndex("EquipmentTypeId"); + + b.HasIndex("LinkageStrategyId"); + + b.HasIndex("PresetPointId"); + + b.HasIndex("TelecommandConfigurationId"); + + b.ToTable("dm_linkage_execute_activity"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.MySQL.DataMonitoring.LinkageStrategy", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConditionIds") + .HasColumnType("longtext"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("DMAlarmCategoryId") + .HasColumnType("char(36)"); + + b.Property("ForceLinkageSeconds") + .HasColumnType("int"); + + b.Property("ForceLinkageTimes") + .HasColumnType("int"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsPatternRecognize") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("RepeatLinkageInterval") + .HasColumnType("int"); + + b.Property("Rule") + .HasColumnType("longtext"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("TimeOfWithRelationship") + .HasColumnType("int"); + + b.Property("TransformerSubstationId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DMAlarmCategoryId"); + + b.HasIndex("TransformerSubstationId"); + + b.ToTable("dm_linkage_strategy"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.MySQL.DataMonitoring.TelemeteringAlarmStrategy", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("DMAlarmCategoryId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("MaxValue") + .HasColumnType("float"); + + b.Property("MinValue") + .HasColumnType("float"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("TelemeteringConfigurationId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("DMAlarmCategoryId"); + + b.HasIndex("TelemeteringConfigurationId"); + + b.ToTable("dm_telemetering_alarm_strategy"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.System.SysConfiguration", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .HasColumnType("longtext"); + + b.Property("Content") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("SysConfigurationType") + .HasColumnType("int"); + + b.Property("TransformerSubstationId") + .HasMaxLength(36) + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TransformerSubstationId"); + + b.ToTable("sys_configuration"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.System.SysFunction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("Icon") + .HasMaxLength(40) + .HasColumnType("varchar(40)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsOperatorPage") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("LoadUrl") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("SysFunctionId") + .HasColumnType("char(36)"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("sys_function"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.System.SysRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("RoleName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.ToTable("sys_role"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.System.SysRoleFunction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsEdit") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("SysFunctionId") + .HasColumnType("char(36)"); + + b.Property("SysRoleId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("SysFunctionId"); + + b.HasIndex("SysRoleId"); + + b.ToTable("sys_role_function"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.System.SysRoleUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("SysRoleId") + .HasColumnType("char(36)"); + + b.Property("SysUserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("SysRoleId"); + + b.HasIndex("SysUserId"); + + b.ToTable("sys_role_user"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.System.SysUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("EmailAddress") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ErrorTimes") + .HasColumnType("int"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsOnline") + .HasColumnType("tinyint(1)"); + + b.Property("LastLoginErrorDate") + .HasColumnType("datetime(6)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("OrganizationalUnit") + .HasColumnType("longtext"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PhoneNumber") + .HasMaxLength(29) + .HasColumnType("varchar(29)"); + + b.Property("RealName") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("UserPriority") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("sys_user"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.VideoSurveillance.CameraAuthentication", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("Illustration") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("Level") + .HasColumnType("int"); + + b.Property("Name") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("Source") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("StationLevel") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("vs_camera_authentication"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.VideoSurveillance.InspectionCard", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CardName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CenterType") + .HasColumnType("int"); + + b.Property("Code") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsIssue") + .HasColumnType("tinyint(1)"); + + b.Property("IsTemporary") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("MasterStationId") + .HasColumnType("char(36)"); + + b.Property("OpenWiper") + .HasColumnType("tinyint(1)"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("ResidenceTime") + .HasColumnType("int"); + + b.Property("TransformerSubstationId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("MasterStationId"); + + b.HasIndex("TransformerSubstationId"); + + b.ToTable("vs_inspection_card"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.VideoSurveillance.InspectionItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("InspectionCardId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsImageRecognition") + .HasColumnType("tinyint(1)"); + + b.Property("IsRecordVideo") + .HasColumnType("tinyint(1)"); + + b.Property("ItemName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("PicturesInterval") + .HasColumnType("int"); + + b.Property("PicturesNumber") + .HasColumnType("int"); + + b.Property("PresetPointId") + .HasColumnType("char(36)"); + + b.Property("ProcessAction") + .HasColumnType("int"); + + b.Property("ProcessDuration") + .HasColumnType("int"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("VideoDevId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("InspectionCardId"); + + b.HasIndex("PresetPointId"); + + b.HasIndex("VideoDevId"); + + b.ToTable("vs_inspection_Item"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.VideoSurveillance.InspectionPlanTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("ExecutionDate") + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("ExecutionTime") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("ExecutionWeek") + .HasColumnType("int"); + + b.Property("InspectionCardId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("PlanTaskName") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("InspectionCardId"); + + b.ToTable("vs_inspection_plan_task"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.VideoSurveillance.LightingControl", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CloseTime") + .HasColumnType("datetime(6)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("LightingOpenRule") + .HasColumnType("int"); + + b.Property("LightingPreheatSeconds") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("OpenTime") + .HasColumnType("datetime(6)"); + + b.Property("PresetPointId") + .HasColumnType("char(36)"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("TelecommandConfigurationId") + .HasColumnType("char(36)"); + + b.Property("TelemeteringConfigurationId") + .HasColumnType("char(36)"); + + b.Property("TelesignalisationConfigurationId") + .HasColumnType("char(36)"); + + b.Property("TransformerSubstationId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("PresetPointId"); + + b.HasIndex("TelecommandConfigurationId"); + + b.HasIndex("TelemeteringConfigurationId"); + + b.HasIndex("TelesignalisationConfigurationId"); + + b.HasIndex("TransformerSubstationId"); + + b.ToTable("vs_lighting_control"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.VideoSurveillance.MeasureTemperaturePoint", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CoordinateJsonStr") + .HasColumnType("longtext"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("Distance") + .HasColumnType("float"); + + b.Property("Emissivity") + .HasColumnType("float"); + + b.Property("EquipmentInfoId") + .HasColumnType("char(36)"); + + b.Property("EquipmentTypeId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("MeasureTemperatureType") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Number") + .HasColumnType("int"); + + b.Property("PresetPointId") + .HasColumnType("char(36)"); + + b.Property("ReflectedTemperature") + .HasColumnType("float"); + + b.Property("TelemeteringConfigurationId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("EquipmentInfoId"); + + b.HasIndex("EquipmentTypeId"); + + b.HasIndex("PresetPointId"); + + b.HasIndex("TelemeteringConfigurationId"); + + b.ToTable("vs_measures_temperature_point"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.VideoSurveillance.PatternRecognitionConfigutration", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Arg") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Box") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("Decimal") + .HasColumnType("int"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsNewAlgorithnm") + .HasColumnType("tinyint(1)"); + + b.Property("ItemName") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("Name") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("PresetPointId") + .HasColumnType("char(36)"); + + b.Property("Rect") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("ResultsMapping") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("TelemeteringConfigurationId") + .HasColumnType("char(36)"); + + b.Property("TelesignalisationConfigurationId") + .HasColumnType("char(36)"); + + b.Property("Type") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Unit") + .HasColumnType("longtext"); + + b.Property("VideoDevId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("PresetPointId"); + + b.HasIndex("TelemeteringConfigurationId"); + + b.HasIndex("TelesignalisationConfigurationId"); + + b.HasIndex("VideoDevId"); + + b.ToTable("vs_pattern_recognition_configutration"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.VideoSurveillance.PresetPoint", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("EquipmentInfoId") + .HasColumnType("char(36)"); + + b.Property("EquipmentTypeId") + .HasColumnType("char(36)"); + + b.Property("EquipmentViewPointId") + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsImageRecognition") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Number") + .HasColumnType("int"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("VideoDevId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("EquipmentInfoId"); + + b.HasIndex("EquipmentTypeId"); + + b.HasIndex("EquipmentViewPointId"); + + b.HasIndex("VideoDevId"); + + b.ToTable("vs_preset_point"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.VideoSurveillance.VideoDev", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ChannelNo") + .HasColumnType("int"); + + b.Property("CodeStreamType") + .HasColumnType("int"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("CtrAuPos") + .HasColumnType("int"); + + b.Property("DevCode") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("DevName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("DevNo") + .HasColumnType("int"); + + b.Property("DevPassword") + .HasMaxLength(30) + .HasColumnType("varchar(30)"); + + b.Property("DevType") + .HasColumnType("int"); + + b.Property("DevUserName") + .HasMaxLength(30) + .HasColumnType("varchar(30)"); + + b.Property("ExternalCommIP") + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("IP") + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("InstallationArea") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); + + b.Property("InstallationDate") + .HasColumnType("datetime(6)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsPTZ") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("LinkVideoDevId") + .HasColumnType("char(36)"); + + b.Property("ManufacturerInfoId") + .HasColumnType("char(36)"); + + b.Property("MasterStationId") + .HasColumnType("char(36)"); + + b.Property("Port") + .HasColumnType("int"); + + b.Property("PostionDescription") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); + + b.Property("ProductionDate") + .HasColumnType("datetime(6)"); + + b.Property("Remark") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("SafetyPlanStateType") + .HasColumnType("int"); + + b.Property("SafetyPlanTime") + .HasColumnType("datetime(6)"); + + b.Property("SafetyStateType") + .HasColumnType("int"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("TransformerSubstationId") + .HasColumnType("char(36)"); + + b.Property("VideoDevId") + .HasColumnType("char(36)"); + + b.Property("VoiceType") + .HasColumnType("int"); + + b.Property("X") + .HasColumnType("float"); + + b.Property("Y") + .HasColumnType("float"); + + b.Property("Z") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.HasIndex("LinkVideoDevId"); + + b.HasIndex("ManufacturerInfoId"); + + b.HasIndex("MasterStationId"); + + b.HasIndex("TransformerSubstationId"); + + b.HasIndex("VideoDevId"); + + b.ToTable("vs_video_dev"); + }); + + modelBuilder.Entity("YunDa.SOMS.Entities.GeneralInformation.BoardCardHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("BoardCardInfoId") + .HasColumnType("char(36)"); + + b.Property("BoardId") + .HasColumnType("longtext"); + + b.Property("ContentJson") + .HasColumnType("longtext"); + + b.Property("ContentNewJson") + .HasColumnType("longtext"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("DeleterUserId") + .HasColumnType("char(36)"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)"); + + b.Property("EventDescription") + .HasColumnType("longtext"); + + b.Property("EventRecordType") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("tinyint(1)"); + + b.Property("IsSend") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("ProtectionDeviceInfoId") + .HasColumnType("char(36)"); + + b.Property("RecodeDate") + .HasColumnType("datetime(6)"); + + b.Property("Remark") + .HasColumnType("longtext"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("gi_board_card_history"); + }); + + modelBuilder.Entity("YunDa.SOMS.Entities.GeneralInformation.BoardCardInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("BoardId") + .HasColumnType("longtext"); + + b.Property("BoardType") + .HasColumnType("longtext"); + + b.Property("BoardTypeId") + .HasColumnType("longtext"); + + b.Property("BootVersion") + .HasColumnType("longtext"); + + b.Property("CcdChecksum") + .HasColumnType("longtext"); + + b.Property("CidChecksum") + .HasColumnType("longtext"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("DeleterUserId") + .HasColumnType("char(36)"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)"); + + b.Property("FpgaVersion") + .HasColumnType("longtext"); + + b.Property("HardwareVersion") + .HasColumnType("longtext"); + + b.Property("IOCrc") + .HasColumnType("longtext"); + + b.Property("IOVersion") + .HasColumnType("longtext"); + + b.Property("Iec61850Version") + .HasColumnType("longtext"); + + b.Property("InstallationDate") + .HasColumnType("datetime(6)"); + + b.Property("InterfaceChecksum") + .HasColumnType("longtext"); + + b.Property("InterfaceDatabaseVersion") + .HasColumnType("longtext"); + + b.Property("InterfaceVersion") + .HasColumnType("longtext"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsDeleted") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("MaintenanceRecord") + .HasColumnType("longtext"); + + b.Property("ManufacturerInfoId") + .HasColumnType("char(36)"); + + b.Property("ProductionDate") + .HasColumnType("datetime(6)"); + + b.Property("ProtectionChecksum") + .HasColumnType("longtext"); + + b.Property("ProtectionDatabaseVersion") + .HasColumnType("longtext"); + + b.Property("ProtectionDeviceInfoId") + .HasColumnType("char(36)"); + + b.Property("ProtectionVersion") + .HasColumnType("longtext"); + + b.Property("Remark") + .HasColumnType("longtext"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("SerialNumber") + .HasColumnType("longtext"); + + b.Property("SystemVersion") + .HasColumnType("longtext"); + + b.Property("VerificationDate") + .HasColumnType("longtext"); + + b.Property("VerificationPerson") + .HasColumnType("longtext"); + + b.Property("VerificationRecords") + .HasColumnType("longtext"); + + b.Property("YjCrc") + .HasColumnType("longtext"); + + b.Property("YjVersion") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("ManufacturerInfoId"); + + b.HasIndex("ProtectionDeviceInfoId"); + + b.ToTable("gi_board_card_info"); + }); + + modelBuilder.Entity("YunDa.SOMS.Entities.GeneralInformation.IntervalEquipmentInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("EquipmentInfoId") + .HasColumnType("char(36)"); + + b.Property("ProtectionDeviceInfoId") + .HasColumnType("char(36)"); + + b.Property("SubstationIntervalId") + .HasColumnType("char(36)"); + + b.Property("TransformerSubstationId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("EquipmentInfoId"); + + b.HasIndex("ProtectionDeviceInfoId"); + + b.HasIndex("SubstationIntervalId"); + + b.HasIndex("TransformerSubstationId"); + + b.ToTable("gi_interval_equipmentInfo"); + }); + + modelBuilder.Entity("YunDa.SOMS.Entities.GeneralInformation.ProtectionDeviceGateway", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("GatewayIP1") + .HasColumnType("longtext"); + + b.Property("GatewayIP2") + .HasColumnType("longtext"); + + b.Property("GatewayPort1") + .HasColumnType("int"); + + b.Property("GatewayPort2") + .HasColumnType("int"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("PhysicalAddress") + .HasColumnType("int"); + + b.Property("ProtectionDeviceInfoId") + .HasColumnType("char(36)"); + + b.Property("Protocol") + .HasColumnType("longtext"); + + b.Property("TransformerSubstationId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProtectionDeviceInfoId"); + + b.HasIndex("TransformerSubstationId"); + + b.ToTable("gi_protection_device_gateway"); + }); + + modelBuilder.Entity("YunDa.SOMS.Entities.GeneralInformation.ProtectionDeviceHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ContentJson") + .HasColumnType("longtext"); + + b.Property("ContentNewJson") + .HasColumnType("longtext"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("DeleterUserId") + .HasColumnType("char(36)"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)"); + + b.Property("EventDescription") + .HasColumnType("longtext"); + + b.Property("EventRecordType") + .HasColumnType("int"); + + b.Property("IsDeleted") + .HasColumnType("tinyint(1)"); + + b.Property("IsSend") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("ProtectionDeviceInfoId") + .HasColumnType("char(36)"); + + b.Property("RecodeDate") + .HasColumnType("datetime(6)"); + + b.Property("Remark") + .HasColumnType("longtext"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ProtectionDeviceInfoId"); + + b.ToTable("gi_protection_device_history"); + }); + + modelBuilder.Entity("YunDa.SOMS.Entities.GeneralInformation.ProtectionDeviceInfo", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("BaselineBoardVersion") + .HasColumnType("longtext"); + + b.Property("BayName") + .HasColumnType("longtext"); + + b.Property("CanSwitchDZZone") + .HasColumnType("tinyint(1)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("DeviceAddress") + .HasColumnType("int"); + + b.Property("DeviceState") + .HasColumnType("int"); + + b.Property("EndOfDKJL") + .HasColumnType("int"); + + b.Property("EquipmentInfoId") + .HasColumnType("char(36)"); + + b.Property("HardwareVersion") + .HasColumnType("longtext"); + + b.Property("ISMS_DeviceId") + .HasColumnType("longtext"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("ProtectionDeviceGatewayId") + .HasColumnType("char(36)"); + + b.Property("ProtectionDeviceTypeId") + .HasColumnType("char(36)"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("Specification") + .HasColumnType("longtext"); + + b.Property("StartOfDKJL") + .HasColumnType("int"); + + b.Property("SupportDKJL") + .HasColumnType("tinyint(1)"); + + b.Property("SupportVersion") + .HasColumnType("int"); + + b.Property("SupportsDualCurrent") + .HasColumnType("int"); + + b.Property("TransformerSubstationId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("EquipmentInfoId"); + + b.HasIndex("ProtectionDeviceGatewayId"); + + b.HasIndex("ProtectionDeviceTypeId"); + + b.HasIndex("TransformerSubstationId"); + + b.HasIndex(new[] { "Name" }, "Index_Name"); + + b.ToTable("gi_protection_device_info"); + }); + + modelBuilder.Entity("YunDa.SOMS.Entities.GeneralInformation.ProtectionDeviceType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AnalogParseMode") + .HasColumnType("longtext"); + + b.Property("CanSwitchDZZone") + .HasColumnType("tinyint(1)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("DZReadOnly") + .HasColumnType("tinyint(1)"); + + b.Property("DZZoneCount") + .HasColumnType("int"); + + b.Property("EndOfDKJL") + .HasColumnType("int"); + + b.Property("EventParseMode") + .HasColumnType("longtext"); + + b.Property("Generation") + .HasColumnType("longtext"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsCRCC") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("ManufacturerInfoId") + .HasColumnType("char(36)"); + + b.Property("Model") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Name") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("PUCtgyCode") + .HasColumnType("int"); + + b.Property("Specification") + .HasColumnType("longtext"); + + b.Property("StartOfDKJL") + .HasColumnType("int"); + + b.Property("Support12YC") + .HasColumnType("tinyint(1)"); + + b.Property("SupportDKJL") + .HasColumnType("tinyint(1)"); + + b.Property("SupportDZ") + .HasColumnType("tinyint(1)"); + + b.Property("SupportEventReport") + .HasColumnType("tinyint(1)"); + + b.Property("SupportFaultReport") + .HasColumnType("tinyint(1)"); + + b.Property("SupportLoadRecording") + .HasColumnType("tinyint(1)"); + + b.Property("SupportRecordingFiles") + .HasColumnType("tinyint(1)"); + + b.Property("SupportSelfTestReport") + .HasColumnType("tinyint(1)"); + + b.Property("SupportVersion") + .HasColumnType("tinyint(1)"); + + b.HasKey("Id"); + + b.HasIndex("ManufacturerInfoId"); + + b.ToTable("gi_protection_device_type"); + }); + + modelBuilder.Entity("YunDa.SOMS.Entities.GeneralInformation.ProtectionSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CpuIndex") + .HasColumnType("int"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("CtrlWordTypeId") + .HasColumnType("int"); + + b.Property("EnumTypeId") + .HasColumnType("int"); + + b.Property("EquipmentInfoId") + .HasColumnType("char(36)"); + + b.Property("ISMS_DeviceDZId") + .HasColumnType("longtext"); + + b.Property("ISMS_DeviceId") + .HasColumnType("longtext"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsHidden") + .HasColumnType("tinyint(1)"); + + b.Property("IsReadOnly") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("Max") + .HasColumnType("float"); + + b.Property("Min") + .HasColumnType("float"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("ProtectionDeviceInfoId") + .HasColumnType("char(36)"); + + b.Property("ProtectionSettingTypeId") + .HasColumnType("char(36)"); + + b.Property("RelatedCtId") + .HasColumnType("longtext"); + + b.Property("RelatedPtId") + .HasColumnType("longtext"); + + b.Property("SettingCoeff") + .HasColumnType("double"); + + b.Property("SettingCoeff1") + .HasColumnType("double"); + + b.Property("SettingComment") + .HasColumnType("longtext"); + + b.Property("SettingIndex") + .HasColumnType("int"); + + b.Property("SettingPrecision") + .HasColumnType("int"); + + b.Property("SettingPrecision1") + .HasColumnType("int"); + + b.Property("SettingRange") + .HasColumnType("longtext"); + + b.Property("SettingUnit") + .HasColumnType("longtext"); + + b.Property("SettingUnit1") + .HasColumnType("longtext"); + + b.Property("UnitConversionCoeff") + .HasColumnType("double"); + + b.HasKey("Id"); + + b.HasIndex("EquipmentInfoId"); + + b.HasIndex("ProtectionDeviceInfoId"); + + b.HasIndex("ProtectionSettingTypeId"); + + b.ToTable("gi_protection_setting"); + }); + + modelBuilder.Entity("YunDa.SOMS.Entities.GeneralInformation.ProtectionSettingType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("Remark") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.ToTable("gi_protection_setting_type"); + }); + + modelBuilder.Entity("YunDa.SOMS.Entities.GeneralInformation.SecondaryCircuit", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CircuitType") + .HasColumnType("int"); + + b.Property("Code") + .HasColumnType("longtext"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("DeleterUserId") + .HasColumnType("char(36)"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsDeleted") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("Name") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("PictureBase64") + .HasColumnType("nvarchar(max)"); + + b.Property("PicturePath") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("Remark") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("SeqNo") + .HasColumnType("int"); + + b.Property("TransformerSubstationId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TransformerSubstationId"); + + b.ToTable("gi_secondary_circuit"); + }); + + modelBuilder.Entity("YunDa.SOMS.Entities.GeneralInformation.SecondaryCircuitLogicExpression", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("DeleterUserId") + .HasColumnType("char(36)"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsDeleted") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("LogicalExpression") + .HasColumnType("longtext"); + + b.Property("Name") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("PicturePath") + .HasColumnType("longtext"); + + b.Property("Remark") + .HasColumnType("longtext"); + + b.Property("SecondaryCircuitId") + .HasColumnType("char(36)"); + + b.Property("TelemeteringConfigurationId") + .HasColumnType("char(36)"); + + b.Property("TelesignalisationConfigurationId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("SecondaryCircuitId"); + + b.HasIndex("TelemeteringConfigurationId"); + + b.HasIndex("TelesignalisationConfigurationId"); + + b.ToTable("gi_secondary_circuit_logic_expression"); + }); + + modelBuilder.Entity("YunDa.SOMS.Entities.GeneralInformation.SecondaryCircuitProtectionDevice", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("ProtectionDeviceId") + .HasColumnType("char(36)"); + + b.Property("Remark") + .HasColumnType("longtext"); + + b.Property("SecondaryCircuitId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("ProtectionDeviceId"); + + b.HasIndex("SecondaryCircuitId"); + + b.ToTable("gi_secondary_circuit_protection_device"); + }); + + modelBuilder.Entity("YunDa.SOMS.Entities.GeneralInformation.SubstationInterval", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("CreatorUserId") + .HasColumnType("char(36)"); + + b.Property("CurrentCapacity") + .HasColumnType("int"); + + b.Property("DeleterUserId") + .HasColumnType("char(36)"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)"); + + b.Property("IntervalType") + .HasColumnType("int"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsDeleted") + .HasColumnType("tinyint(1)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)"); + + b.Property("LastModifierUserId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("ProtectionType") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("TransformerSubstationId") + .HasColumnType("char(36)"); + + b.Property("VoltageLevel") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.HasKey("Id"); + + b.HasIndex("TransformerSubstationId"); + + b.ToTable("gi_substation_interval"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.ClientConfiguration.ThreeDimension.CCThreeDimension", b => + { + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentInfo", "EquipmentInfo") + .WithMany() + .HasForeignKey("EquipmentInfoId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.DataMonitoring.TelecommandConfiguration", "TelecommandConfiguration") + .WithMany() + .HasForeignKey("TelecommandConfigurationId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.DataMonitoring.TelemeteringConfiguration", "TelemeteringConfiguration") + .WithMany() + .HasForeignKey("TelemeteringConfigurationId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.DataMonitoring.TelesignalisationConfiguration", "TelesignalisationConfiguration") + .WithMany() + .HasForeignKey("TelesignalisationConfigurationId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.TransformerSubstation", "TransformerSubstation") + .WithMany() + .HasForeignKey("TransformerSubstationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("YunDa.ISAS.Entities.VideoSurveillance.VideoDev", "VideoInfo") + .WithMany() + .HasForeignKey("VideoDevId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("EquipmentInfo"); + + b.Navigation("TelecommandConfiguration"); + + b.Navigation("TelemeteringConfiguration"); + + b.Navigation("TelesignalisationConfiguration"); + + b.Navigation("TransformerSubstation"); + + b.Navigation("VideoInfo"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.DataMonitoring.MultidimensionalCheck", b => + { + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentInfo", "EquipmentInfo") + .WithMany() + .HasForeignKey("EquipmentInfoId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.VideoSurveillance.PatternRecognitionConfigutration", "PatternRecognitionConfigutration1") + .WithMany() + .HasForeignKey("PatternRecognitionConfigutrationId1") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.VideoSurveillance.PatternRecognitionConfigutration", "PatternRecognitionConfigutration2") + .WithMany() + .HasForeignKey("PatternRecognitionConfigutrationId2") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("FK_dm_multidimensional_check_vs_pattern_recognition_configutra~1"); + + b.HasOne("YunDa.ISAS.Entities.VideoSurveillance.PresetPoint", "PresetPoint1") + .WithMany() + .HasForeignKey("PresetPointId1") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.VideoSurveillance.PresetPoint", "PresetPoint2") + .WithMany() + .HasForeignKey("PresetPointId2") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.DataMonitoring.TelesignalisationConfiguration", "TelesignalisationConfiguration") + .WithMany() + .HasForeignKey("TelesignalisationConfigurationId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.TransformerSubstation", "TransformerSubstation") + .WithMany() + .HasForeignKey("TransformerSubstationId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("EquipmentInfo"); + + b.Navigation("PatternRecognitionConfigutration1"); + + b.Navigation("PatternRecognitionConfigutration2"); + + b.Navigation("PresetPoint1"); + + b.Navigation("PresetPoint2"); + + b.Navigation("TelesignalisationConfiguration"); + + b.Navigation("TransformerSubstation"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.DataMonitoring.SelfCheckingConfiguration", b => + { + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.TransformerSubstation", "TransformerSubstation") + .WithMany() + .HasForeignKey("TransformerSubstationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TransformerSubstation"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.DataMonitoring.TeleCommandPlanSetting", b => + { + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.TransformerSubstation", "TransformerSubstation") + .WithMany() + .HasForeignKey("TransformerSubstationId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("TransformerSubstation"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.DataMonitoring.TeleCommandPlanTime", b => + { + b.HasOne("YunDa.ISAS.Entities.DataMonitoring.TeleCommandPlanSetting", "TeleCommandPlanSetting") + .WithMany() + .HasForeignKey("TeleCommandPlanSettingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.TransformerSubstation", "TransformerSubstation") + .WithMany() + .HasForeignKey("TransformerSubstationId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("TeleCommandPlanSetting"); + + b.Navigation("TransformerSubstation"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.DataMonitoring.TeleCommandSettingItem", b => + { + b.HasOne("YunDa.ISAS.Entities.DataMonitoring.TeleCommandPlanSetting", "TeleCommandPlanSetting") + .WithMany("TeleCommandSettingItems") + .HasForeignKey("TeleCommandPlanSettingId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.DataMonitoring.TelecommandConfiguration", "TelecommandConfiguration") + .WithMany() + .HasForeignKey("TelecommandConfigurationId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("TeleCommandPlanSetting"); + + b.Navigation("TelecommandConfiguration"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.DataMonitoring.TelecommandConfiguration", b => + { + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentInfo", "EquipmentInfo") + .WithMany() + .HasForeignKey("EquipmentInfoId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentType", "EquipmentType") + .WithMany() + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.DataMonitoring.TelesignalisationConfiguration", "RelatedTelesignalisation") + .WithMany() + .HasForeignKey("RelatedTelesignalisationId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.TransformerSubstation", "TransformerSubstation") + .WithMany() + .HasForeignKey("TransformerSubstationId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("EquipmentInfo"); + + b.Navigation("EquipmentType"); + + b.Navigation("RelatedTelesignalisation"); + + b.Navigation("TransformerSubstation"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.DataMonitoring.TelecommandTemplate", b => + { + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentType", "EquipmentType") + .WithMany("TelecommandTemplates") + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("EquipmentType"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.DataMonitoring.TelemeteringAlarmTemplate", b => + { + b.HasOne("YunDa.ISAS.Entities.MySQL.DataMonitoring.DMAlarmCategory", "DMAlarmCategory") + .WithMany() + .HasForeignKey("DMAlarmCategoryId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.DataMonitoring.TelemeteringTemplate", "TelemeteringTemplate") + .WithMany("TelemeteringAlarmTemplates") + .HasForeignKey("TelemeteringTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DMAlarmCategory"); + + b.Navigation("TelemeteringTemplate"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.DataMonitoring.TelemeteringConfiguration", b => + { + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentInfo", "EquipmentInfo") + .WithMany() + .HasForeignKey("EquipmentInfoId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentType", "EquipmentType") + .WithMany() + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.DataMonitoring.SelfCheckingConfiguration", "SelfCheckingConfiguration") + .WithMany() + .HasForeignKey("SelfCheckingConfigurationId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.TransformerSubstation", "TransformerSubstation") + .WithMany() + .HasForeignKey("TransformerSubstationId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("EquipmentInfo"); + + b.Navigation("EquipmentType"); + + b.Navigation("SelfCheckingConfiguration"); + + b.Navigation("TransformerSubstation"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.DataMonitoring.TelemeteringTemplate", b => + { + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentType", "EquipmentType") + .WithMany("TelemeteringTemplates") + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("EquipmentType"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.DataMonitoring.TelesignalisationConfiguration", b => + { + b.HasOne("YunDa.ISAS.Entities.MySQL.DataMonitoring.DMAlarmCategory", "DMAlarmCategory") + .WithMany() + .HasForeignKey("DMAlarmCategoryId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentInfo", "EquipmentInfo") + .WithMany() + .HasForeignKey("EquipmentInfoId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentType", "EquipmentType") + .WithMany() + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.DataMonitoring.SelfCheckingConfiguration", "SelfCheckingConfiguration") + .WithMany() + .HasForeignKey("SelfCheckingConfigurationId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.TransformerSubstation", "TransformerSubstation") + .WithMany() + .HasForeignKey("TransformerSubstationId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("DMAlarmCategory"); + + b.Navigation("EquipmentInfo"); + + b.Navigation("EquipmentType"); + + b.Navigation("SelfCheckingConfiguration"); + + b.Navigation("TransformerSubstation"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.DataMonitoring.TelesignalisationTemplate", b => + { + b.HasOne("YunDa.ISAS.Entities.MySQL.DataMonitoring.DMAlarmCategory", "DMAlarmCategory") + .WithMany() + .HasForeignKey("DMAlarmCategoryId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentType", "EquipmentType") + .WithMany("TelesignalisationTemplates") + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("DMAlarmCategory"); + + b.Navigation("EquipmentType"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.Foundation.NameDateText", b => + { + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.TransformerSubstation", "TransformerSubstation") + .WithMany() + .HasForeignKey("TransformerSubstationId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("TransformerSubstation"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.GeneralInformation.EquipmentDataCategory", b => + { + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentType", "EquipmentType") + .WithMany() + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.TransformerSubstation", "TransformerSubstation") + .WithMany() + .HasForeignKey("TransformerSubstationId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("EquipmentType"); + + b.Navigation("TransformerSubstation"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.GeneralInformation.EquipmentDataCategoryExactly", b => + { + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentDataCategory", "EquipmentDataCategory") + .WithMany() + .HasForeignKey("EquipmentDataCategoryId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentInfo", "EquipmentInfo") + .WithMany() + .HasForeignKey("EquipmentInfoId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentType", "EquipmentType") + .WithMany() + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.TransformerSubstation", "TransformerSubstation") + .WithMany() + .HasForeignKey("TransformerSubstationId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("EquipmentDataCategory"); + + b.Navigation("EquipmentInfo"); + + b.Navigation("EquipmentType"); + + b.Navigation("TransformerSubstation"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.GeneralInformation.EquipmentInfo", b => + { + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentInfo", "BelongEquipmentInfo") + .WithMany() + .HasForeignKey("BelongEquipmentInfoId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentType", "EquipmentType") + .WithMany("EquipmentInfos") + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.ManufacturerInfo", "ManufacturerInfo") + .WithMany() + .HasForeignKey("ManufacturerInfoId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.TransformerSubstation", "TransformerSubstation") + .WithMany() + .HasForeignKey("TransformerSubstationId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("BelongEquipmentInfo"); + + b.Navigation("EquipmentType"); + + b.Navigation("ManufacturerInfo"); + + b.Navigation("TransformerSubstation"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.GeneralInformation.EquipmentLinkTeledata", b => + { + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentInfo", "DataEquipmentInfo") + .WithMany() + .HasForeignKey("DataEquipmentInfoId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentDataCategoryExactly", "EquipmentDataCategoryExactly") + .WithMany() + .HasForeignKey("EquipmentDataCategoryExactlyId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentInfo", "EquipmentInfo") + .WithMany() + .HasForeignKey("EquipmentInfoId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.DataMonitoring.TelemeteringConfiguration", "TelemeteringConfiguration") + .WithMany() + .HasForeignKey("TelemeteringConfigurationId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.DataMonitoring.TelesignalisationConfiguration", "TelesignalisationConfiguration") + .WithMany() + .HasForeignKey("TelesignalisationConfigurationId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("DataEquipmentInfo"); + + b.Navigation("EquipmentDataCategoryExactly"); + + b.Navigation("EquipmentInfo"); + + b.Navigation("TelemeteringConfiguration"); + + b.Navigation("TelesignalisationConfiguration"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.GeneralInformation.EquipmentTypeViewPoint", b => + { + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentType", "EquipmentType") + .WithMany() + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("EquipmentType"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.GeneralInformation.EquipmentViewPoint", b => + { + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentInfo", "EquipmentInfo") + .WithMany() + .HasForeignKey("EquipmentInfoId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentTypeViewPoint", "EquipmentTypeViewPoint") + .WithMany() + .HasForeignKey("EquipmentTypeViewPointId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.TransformerSubstation", "TransformerSubstation") + .WithMany() + .HasForeignKey("TransformerSubstationId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("EquipmentInfo"); + + b.Navigation("EquipmentTypeViewPoint"); + + b.Navigation("TransformerSubstation"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.GeneralInformation.SubMasterStationRelation", b => + { + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.TransformerSubstation", "MasterStation") + .WithMany() + .HasForeignKey("MasterStationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.TransformerSubstation", "TransformerSubstation") + .WithMany() + .HasForeignKey("TransformerSubstationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("MasterStation"); + + b.Navigation("TransformerSubstation"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.GeneralInformation.TransformerSubstation", b => + { + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.PowerSupplyLine", "PowerSupplyLine") + .WithMany("TransformerSubstations") + .HasForeignKey("PowerSupplyLineId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("PowerSupplyLine"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.MobileSurveillance.RobotDeviceInfo", b => + { + b.HasOne("YunDa.ISAS.Entities.MobileSurveillance.RobotInfo", "RobotInfo") + .WithMany() + .HasForeignKey("RobotInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("YunDa.ISAS.Entities.MobileSurveillance.RobotTask", null) + .WithMany("RobotDeviceInfos") + .HasForeignKey("RobotTaskId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("RobotInfo"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.MobileSurveillance.RobotInfo", b => + { + b.HasOne("YunDa.ISAS.Entities.VideoSurveillance.VideoDev", "GeneralCamera") + .WithMany() + .HasForeignKey("GeneralCameraId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.VideoSurveillance.VideoDev", "InfraredCamera") + .WithMany() + .HasForeignKey("InfraredCameraId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.ManufacturerInfo", "ManufacturerInfo") + .WithMany() + .HasForeignKey("ManufacturerInfoId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.TransformerSubstation", "TransformerSubstation") + .WithMany() + .HasForeignKey("TransformerSubstationId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("GeneralCamera"); + + b.Navigation("InfraredCamera"); + + b.Navigation("ManufacturerInfo"); + + b.Navigation("TransformerSubstation"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.MobileSurveillance.RobotTask", b => + { + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.MasterStation", "MasterStation") + .WithMany() + .HasForeignKey("MasterStationId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.MobileSurveillance.RobotInfo", "RobotInfo") + .WithMany() + .HasForeignKey("RobotInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("MasterStation"); + + b.Navigation("RobotInfo"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.MobileSurveillance.RobotTaskItemLink", b => + { + b.HasOne("YunDa.ISAS.Entities.MobileSurveillance.RobotDeviceInfo", "RobotDeviceInfo") + .WithMany() + .HasForeignKey("RobotDeviceInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("YunDa.ISAS.Entities.MobileSurveillance.RobotTask", "RobotTask") + .WithMany() + .HasForeignKey("RobotTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("RobotDeviceInfo"); + + b.Navigation("RobotTask"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.MySQL.DataMonitoring.LinkageCondition", b => + { + b.HasOne("YunDa.ISAS.Entities.VideoSurveillance.CameraAuthentication", "CameraAuthentication") + .WithMany() + .HasForeignKey("CameraAuthenticationId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentInfo", "EquipmentInfo") + .WithMany() + .HasForeignKey("EquipmentInfoId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentType", "EquipmentType") + .WithMany() + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.MySQL.DataMonitoring.LinkageStrategy", "LinkageStrategy") + .WithMany("LinkageConditions") + .HasForeignKey("LinkageStrategyId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.DataMonitoring.TelemeteringConfiguration", "TelemeteringConfiguration") + .WithMany() + .HasForeignKey("TelemeteringConfigurationId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.DataMonitoring.TelesignalisationConfiguration", "TelesignalisationConfiguration") + .WithMany() + .HasForeignKey("TelesignalisationConfigurationId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("CameraAuthentication"); + + b.Navigation("EquipmentInfo"); + + b.Navigation("EquipmentType"); + + b.Navigation("LinkageStrategy"); + + b.Navigation("TelemeteringConfiguration"); + + b.Navigation("TelesignalisationConfiguration"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.MySQL.DataMonitoring.LinkageExecuteActivity", b => + { + b.HasOne("YunDa.ISAS.Entities.VideoSurveillance.CameraAuthentication", "CameraAuthentication") + .WithMany() + .HasForeignKey("CameraAuthenticationId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentInfo", "EquipmentInfo") + .WithMany() + .HasForeignKey("EquipmentInfoId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentType", "EquipmentType") + .WithMany() + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.MySQL.DataMonitoring.LinkageStrategy", "LinkageStrategy") + .WithMany("LinkageExecuteActivities") + .HasForeignKey("LinkageStrategyId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.VideoSurveillance.PresetPoint", "PresetPoint") + .WithMany() + .HasForeignKey("PresetPointId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.DataMonitoring.TelecommandConfiguration", "TelecommandConfiguration") + .WithMany() + .HasForeignKey("TelecommandConfigurationId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("CameraAuthentication"); + + b.Navigation("EquipmentInfo"); + + b.Navigation("EquipmentType"); + + b.Navigation("LinkageStrategy"); + + b.Navigation("PresetPoint"); + + b.Navigation("TelecommandConfiguration"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.MySQL.DataMonitoring.LinkageStrategy", b => + { + b.HasOne("YunDa.ISAS.Entities.MySQL.DataMonitoring.DMAlarmCategory", "DMAlarmCategory") + .WithMany() + .HasForeignKey("DMAlarmCategoryId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.TransformerSubstation", "TransformerSubstation") + .WithMany() + .HasForeignKey("TransformerSubstationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DMAlarmCategory"); + + b.Navigation("TransformerSubstation"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.MySQL.DataMonitoring.TelemeteringAlarmStrategy", b => + { + b.HasOne("YunDa.ISAS.Entities.MySQL.DataMonitoring.DMAlarmCategory", "DMAlarmCategory") + .WithMany() + .HasForeignKey("DMAlarmCategoryId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.DataMonitoring.TelemeteringConfiguration", "TelemeteringConfiguration") + .WithMany("TelemeteringAlarmStrategys") + .HasForeignKey("TelemeteringConfigurationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DMAlarmCategory"); + + b.Navigation("TelemeteringConfiguration"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.System.SysConfiguration", b => + { + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.TransformerSubstation", "TransformerSubstation") + .WithMany() + .HasForeignKey("TransformerSubstationId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("TransformerSubstation"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.System.SysRoleFunction", b => + { + b.HasOne("YunDa.ISAS.Entities.System.SysFunction", "SysFunction") + .WithMany() + .HasForeignKey("SysFunctionId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.System.SysRole", "SysRole") + .WithMany() + .HasForeignKey("SysRoleId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("SysFunction"); + + b.Navigation("SysRole"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.System.SysRoleUser", b => + { + b.HasOne("YunDa.ISAS.Entities.System.SysRole", "SysRole") + .WithMany() + .HasForeignKey("SysRoleId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.System.SysUser", "SysUser") + .WithMany() + .HasForeignKey("SysUserId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("SysRole"); + + b.Navigation("SysUser"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.VideoSurveillance.InspectionCard", b => + { + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.MasterStation", "MasterStation") + .WithMany() + .HasForeignKey("MasterStationId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.TransformerSubstation", "TransformerSubstation") + .WithMany("InspectionCards") + .HasForeignKey("TransformerSubstationId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("MasterStation"); + + b.Navigation("TransformerSubstation"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.VideoSurveillance.InspectionItem", b => + { + b.HasOne("YunDa.ISAS.Entities.VideoSurveillance.InspectionCard", "InspectionCard") + .WithMany("InspectionItems") + .HasForeignKey("InspectionCardId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.VideoSurveillance.PresetPoint", "PresetPoint") + .WithMany("InspectionItems") + .HasForeignKey("PresetPointId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.VideoSurveillance.VideoDev", "VideoDev") + .WithMany("InspectionItems") + .HasForeignKey("VideoDevId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("InspectionCard"); + + b.Navigation("PresetPoint"); + + b.Navigation("VideoDev"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.VideoSurveillance.InspectionPlanTask", b => + { + b.HasOne("YunDa.ISAS.Entities.VideoSurveillance.InspectionCard", "InspectionCard") + .WithMany("InspectionPlanTasks") + .HasForeignKey("InspectionCardId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("InspectionCard"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.VideoSurveillance.LightingControl", b => + { + b.HasOne("YunDa.ISAS.Entities.VideoSurveillance.PresetPoint", "PresetPoint") + .WithMany() + .HasForeignKey("PresetPointId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.DataMonitoring.TelecommandConfiguration", "TelecommandConfiguration") + .WithMany() + .HasForeignKey("TelecommandConfigurationId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.DataMonitoring.TelemeteringConfiguration", "TelemeteringConfiguration") + .WithMany() + .HasForeignKey("TelemeteringConfigurationId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.DataMonitoring.TelesignalisationConfiguration", "TelesignalisationConfiguration") + .WithMany() + .HasForeignKey("TelesignalisationConfigurationId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.TransformerSubstation", "TransformerSubstation") + .WithMany() + .HasForeignKey("TransformerSubstationId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("PresetPoint"); + + b.Navigation("TelecommandConfiguration"); + + b.Navigation("TelemeteringConfiguration"); + + b.Navigation("TelesignalisationConfiguration"); + + b.Navigation("TransformerSubstation"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.VideoSurveillance.MeasureTemperaturePoint", b => + { + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentInfo", "EquipmentInfo") + .WithMany() + .HasForeignKey("EquipmentInfoId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentType", "EquipmentType") + .WithMany() + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.VideoSurveillance.PresetPoint", "PresetPoint") + .WithMany("MeasureTemperaturePoints") + .HasForeignKey("PresetPointId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.DataMonitoring.TelemeteringConfiguration", "TelemeteringConfiguration") + .WithMany() + .HasForeignKey("TelemeteringConfigurationId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("EquipmentInfo"); + + b.Navigation("EquipmentType"); + + b.Navigation("PresetPoint"); + + b.Navigation("TelemeteringConfiguration"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.VideoSurveillance.PatternRecognitionConfigutration", b => + { + b.HasOne("YunDa.ISAS.Entities.VideoSurveillance.PresetPoint", "PresetPoint") + .WithMany() + .HasForeignKey("PresetPointId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.DataMonitoring.TelemeteringConfiguration", "Telemetering") + .WithMany() + .HasForeignKey("TelemeteringConfigurationId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.DataMonitoring.TelesignalisationConfiguration", "Telesignalisation") + .WithMany() + .HasForeignKey("TelesignalisationConfigurationId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.VideoSurveillance.VideoDev", "VideoDev") + .WithMany() + .HasForeignKey("VideoDevId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("PresetPoint"); + + b.Navigation("Telemetering"); + + b.Navigation("Telesignalisation"); + + b.Navigation("VideoDev"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.VideoSurveillance.PresetPoint", b => + { + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentInfo", "EquipmentInfo") + .WithMany() + .HasForeignKey("EquipmentInfoId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentType", "EquipmentType") + .WithMany() + .HasForeignKey("EquipmentTypeId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentViewPoint", "EquipmentViewPoint") + .WithMany() + .HasForeignKey("EquipmentViewPointId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.VideoSurveillance.VideoDev", "VideoDev") + .WithMany("PresetPoints") + .HasForeignKey("VideoDevId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("EquipmentInfo"); + + b.Navigation("EquipmentType"); + + b.Navigation("EquipmentViewPoint"); + + b.Navigation("VideoDev"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.VideoSurveillance.VideoDev", b => + { + b.HasOne("YunDa.ISAS.Entities.VideoSurveillance.VideoDev", "LinkVideoDev") + .WithMany() + .HasForeignKey("LinkVideoDevId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.ManufacturerInfo", "ManufacturerInfo") + .WithMany() + .HasForeignKey("ManufacturerInfoId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.MasterStation", "MasterStation") + .WithMany() + .HasForeignKey("MasterStationId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.TransformerSubstation", "TransformerSubstation") + .WithMany("VideoDevs") + .HasForeignKey("TransformerSubstationId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.VideoSurveillance.VideoDev", "Parent") + .WithMany() + .HasForeignKey("VideoDevId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("LinkVideoDev"); + + b.Navigation("ManufacturerInfo"); + + b.Navigation("MasterStation"); + + b.Navigation("Parent"); + + b.Navigation("TransformerSubstation"); + }); + + modelBuilder.Entity("YunDa.SOMS.Entities.GeneralInformation.BoardCardInfo", b => + { + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.ManufacturerInfo", "ManufacturerInfo") + .WithMany() + .HasForeignKey("ManufacturerInfoId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.SOMS.Entities.GeneralInformation.ProtectionDeviceInfo", "ProtectionDeviceInfo") + .WithMany() + .HasForeignKey("ProtectionDeviceInfoId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("ManufacturerInfo"); + + b.Navigation("ProtectionDeviceInfo"); + }); + + modelBuilder.Entity("YunDa.SOMS.Entities.GeneralInformation.IntervalEquipmentInfo", b => + { + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentInfo", "EquipmentInfo") + .WithMany() + .HasForeignKey("EquipmentInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("YunDa.SOMS.Entities.GeneralInformation.ProtectionDeviceInfo", "ProtectionDeviceInfo") + .WithMany() + .HasForeignKey("ProtectionDeviceInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("YunDa.SOMS.Entities.GeneralInformation.SubstationInterval", "SubstationInterval") + .WithMany() + .HasForeignKey("SubstationIntervalId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.TransformerSubstation", "TransformerSubstation") + .WithMany() + .HasForeignKey("TransformerSubstationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EquipmentInfo"); + + b.Navigation("ProtectionDeviceInfo"); + + b.Navigation("SubstationInterval"); + + b.Navigation("TransformerSubstation"); + }); + + modelBuilder.Entity("YunDa.SOMS.Entities.GeneralInformation.ProtectionDeviceGateway", b => + { + b.HasOne("YunDa.SOMS.Entities.GeneralInformation.ProtectionDeviceInfo", "ProtectionDeviceInfo") + .WithMany() + .HasForeignKey("ProtectionDeviceInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.TransformerSubstation", "TransformerSubstation") + .WithMany() + .HasForeignKey("TransformerSubstationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ProtectionDeviceInfo"); + + b.Navigation("TransformerSubstation"); + }); + + modelBuilder.Entity("YunDa.SOMS.Entities.GeneralInformation.ProtectionDeviceHistory", b => + { + b.HasOne("YunDa.SOMS.Entities.GeneralInformation.ProtectionDeviceInfo", "ProtectionDeviceInfo") + .WithMany() + .HasForeignKey("ProtectionDeviceInfoId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("ProtectionDeviceInfo"); + }); + + modelBuilder.Entity("YunDa.SOMS.Entities.GeneralInformation.ProtectionDeviceInfo", b => + { + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentInfo", "EquipmentInfo") + .WithMany() + .HasForeignKey("EquipmentInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("YunDa.SOMS.Entities.GeneralInformation.ProtectionDeviceGateway", "ProtectionDeviceGateway") + .WithMany() + .HasForeignKey("ProtectionDeviceGatewayId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.SOMS.Entities.GeneralInformation.ProtectionDeviceType", "ProtectionDeviceType") + .WithMany() + .HasForeignKey("ProtectionDeviceTypeId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.TransformerSubstation", "TransformerSubstation") + .WithMany() + .HasForeignKey("TransformerSubstationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EquipmentInfo"); + + b.Navigation("ProtectionDeviceGateway"); + + b.Navigation("ProtectionDeviceType"); + + b.Navigation("TransformerSubstation"); + }); + + modelBuilder.Entity("YunDa.SOMS.Entities.GeneralInformation.ProtectionDeviceType", b => + { + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.ManufacturerInfo", "ManufacturerInfo") + .WithMany() + .HasForeignKey("ManufacturerInfoId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("ManufacturerInfo"); + }); + + modelBuilder.Entity("YunDa.SOMS.Entities.GeneralInformation.ProtectionSetting", b => + { + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.EquipmentInfo", "EquipmentInfo") + .WithMany() + .HasForeignKey("EquipmentInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("YunDa.SOMS.Entities.GeneralInformation.ProtectionDeviceInfo", "ProtectionDeviceInfo") + .WithMany() + .HasForeignKey("ProtectionDeviceInfoId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("YunDa.SOMS.Entities.GeneralInformation.ProtectionSettingType", "ProtectionSettingType") + .WithMany() + .HasForeignKey("ProtectionSettingTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EquipmentInfo"); + + b.Navigation("ProtectionDeviceInfo"); + + b.Navigation("ProtectionSettingType"); + }); + + modelBuilder.Entity("YunDa.SOMS.Entities.GeneralInformation.SecondaryCircuit", b => + { + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.TransformerSubstation", "TransformerSubstation") + .WithMany() + .HasForeignKey("TransformerSubstationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TransformerSubstation"); + }); + + modelBuilder.Entity("YunDa.SOMS.Entities.GeneralInformation.SecondaryCircuitLogicExpression", b => + { + b.HasOne("YunDa.SOMS.Entities.GeneralInformation.SecondaryCircuit", "SecondaryCircuit") + .WithMany() + .HasForeignKey("SecondaryCircuitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("YunDa.ISAS.Entities.DataMonitoring.TelemeteringConfiguration", "TelemeteringConfiguration") + .WithMany() + .HasForeignKey("TelemeteringConfigurationId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("YunDa.ISAS.Entities.DataMonitoring.TelesignalisationConfiguration", "TelesignalisationConfiguration") + .WithMany() + .HasForeignKey("TelesignalisationConfigurationId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("SecondaryCircuit"); + + b.Navigation("TelemeteringConfiguration"); + + b.Navigation("TelesignalisationConfiguration"); + }); + + modelBuilder.Entity("YunDa.SOMS.Entities.GeneralInformation.SecondaryCircuitProtectionDevice", b => + { + b.HasOne("YunDa.SOMS.Entities.GeneralInformation.ProtectionDeviceInfo", "ProtectionDevice") + .WithMany() + .HasForeignKey("ProtectionDeviceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("YunDa.SOMS.Entities.GeneralInformation.SecondaryCircuit", "SecondaryCircuit") + .WithMany() + .HasForeignKey("SecondaryCircuitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ProtectionDevice"); + + b.Navigation("SecondaryCircuit"); + }); + + modelBuilder.Entity("YunDa.SOMS.Entities.GeneralInformation.SubstationInterval", b => + { + b.HasOne("YunDa.ISAS.Entities.GeneralInformation.TransformerSubstation", "TransformerSubstation") + .WithMany() + .HasForeignKey("TransformerSubstationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TransformerSubstation"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.DataMonitoring.TeleCommandPlanSetting", b => + { + b.Navigation("TeleCommandSettingItems"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.DataMonitoring.TelemeteringConfiguration", b => + { + b.Navigation("TelemeteringAlarmStrategys"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.DataMonitoring.TelemeteringTemplate", b => + { + b.Navigation("TelemeteringAlarmTemplates"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.GeneralInformation.EquipmentType", b => + { + b.Navigation("EquipmentInfos"); + + b.Navigation("TelecommandTemplates"); + + b.Navigation("TelemeteringTemplates"); + + b.Navigation("TelesignalisationTemplates"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.GeneralInformation.PowerSupplyLine", b => + { + b.Navigation("TransformerSubstations"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.GeneralInformation.TransformerSubstation", b => + { + b.Navigation("InspectionCards"); + + b.Navigation("VideoDevs"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.MobileSurveillance.RobotTask", b => + { + b.Navigation("RobotDeviceInfos"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.MySQL.DataMonitoring.LinkageStrategy", b => + { + b.Navigation("LinkageConditions"); + + b.Navigation("LinkageExecuteActivities"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.VideoSurveillance.InspectionCard", b => + { + b.Navigation("InspectionItems"); + + b.Navigation("InspectionPlanTasks"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.VideoSurveillance.PresetPoint", b => + { + b.Navigation("InspectionItems"); + + b.Navigation("MeasureTemperaturePoints"); + }); + + modelBuilder.Entity("YunDa.ISAS.Entities.VideoSurveillance.VideoDev", b => + { + b.Navigation("InspectionItems"); + + b.Navigation("PresetPoints"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/YunDa.Domain/YunDa.ISAS.EntityFrameworkCore/Migrations/20241210032229_update_table_v92.cs b/src/YunDa.Domain/YunDa.ISAS.EntityFrameworkCore/Migrations/20241210032229_update_table_v92.cs new file mode 100644 index 0000000..9363679 --- /dev/null +++ b/src/YunDa.Domain/YunDa.ISAS.EntityFrameworkCore/Migrations/20241210032229_update_table_v92.cs @@ -0,0 +1,128 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace YunDa.ISAS.Migrations +{ + /// + public partial class update_table_v92 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "EventDescription", + table: "gi_protection_device_history", + type: "longtext", + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "EventRecordType", + table: "gi_protection_device_history", + type: "int", + nullable: false, + defaultValue: 0); + + migrationBuilder.AddColumn( + name: "IsSend", + table: "gi_protection_device_history", + type: "tinyint(1)", + nullable: false, + defaultValue: false); + + migrationBuilder.AddColumn( + name: "Remark", + table: "gi_protection_device_history", + type: "longtext", + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "MaintenanceRecord", + table: "gi_equipment_info", + type: "longtext", + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "MaintenanceRecord", + table: "gi_board_card_info", + type: "longtext", + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "EventDescription", + table: "gi_board_card_history", + type: "longtext", + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "EventRecordType", + table: "gi_board_card_history", + type: "int", + nullable: false, + defaultValue: 0); + + migrationBuilder.AddColumn( + name: "IsSend", + table: "gi_board_card_history", + type: "tinyint(1)", + nullable: false, + defaultValue: false); + + migrationBuilder.AddColumn( + name: "Remark", + table: "gi_board_card_history", + type: "longtext", + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "EventDescription", + table: "gi_protection_device_history"); + + migrationBuilder.DropColumn( + name: "EventRecordType", + table: "gi_protection_device_history"); + + migrationBuilder.DropColumn( + name: "IsSend", + table: "gi_protection_device_history"); + + migrationBuilder.DropColumn( + name: "Remark", + table: "gi_protection_device_history"); + + migrationBuilder.DropColumn( + name: "MaintenanceRecord", + table: "gi_equipment_info"); + + migrationBuilder.DropColumn( + name: "MaintenanceRecord", + table: "gi_board_card_info"); + + migrationBuilder.DropColumn( + name: "EventDescription", + table: "gi_board_card_history"); + + migrationBuilder.DropColumn( + name: "EventRecordType", + table: "gi_board_card_history"); + + migrationBuilder.DropColumn( + name: "IsSend", + table: "gi_board_card_history"); + + migrationBuilder.DropColumn( + name: "Remark", + table: "gi_board_card_history"); + } + } +} diff --git a/src/YunDa.Domain/YunDa.ISAS.EntityFrameworkCore/Migrations/ISASDbContextModelSnapshot.cs b/src/YunDa.Domain/YunDa.ISAS.EntityFrameworkCore/Migrations/ISASDbContextModelSnapshot.cs index 751f473..e2f91b1 100644 --- a/src/YunDa.Domain/YunDa.ISAS.EntityFrameworkCore/Migrations/ISASDbContextModelSnapshot.cs +++ b/src/YunDa.Domain/YunDa.ISAS.EntityFrameworkCore/Migrations/ISASDbContextModelSnapshot.cs @@ -1149,6 +1149,9 @@ namespace YunDa.ISAS.Migrations b.Property("LastModifierUserId") .HasColumnType("char(36)"); + b.Property("MaintenanceRecord") + .HasColumnType("longtext"); + b.Property("ManufacturerInfoId") .HasColumnType("char(36)"); @@ -3277,9 +3280,18 @@ namespace YunDa.ISAS.Migrations b.Property("DeletionTime") .HasColumnType("datetime(6)"); + b.Property("EventDescription") + .HasColumnType("longtext"); + + b.Property("EventRecordType") + .HasColumnType("int"); + b.Property("IsDeleted") .HasColumnType("tinyint(1)"); + b.Property("IsSend") + .HasColumnType("tinyint(1)"); + b.Property("LastModificationTime") .HasColumnType("datetime(6)"); @@ -3295,6 +3307,9 @@ namespace YunDa.ISAS.Migrations b.Property("RecodeDate") .HasColumnType("datetime(6)"); + b.Property("Remark") + .HasColumnType("longtext"); + b.Property("SeqNo") .HasColumnType("int"); @@ -3378,6 +3393,9 @@ namespace YunDa.ISAS.Migrations b.Property("LastModifierUserId") .HasColumnType("char(36)"); + b.Property("MaintenanceRecord") + .HasColumnType("longtext"); + b.Property("ManufacturerInfoId") .HasColumnType("char(36)"); @@ -3544,9 +3562,18 @@ namespace YunDa.ISAS.Migrations b.Property("DeletionTime") .HasColumnType("datetime(6)"); + b.Property("EventDescription") + .HasColumnType("longtext"); + + b.Property("EventRecordType") + .HasColumnType("int"); + b.Property("IsDeleted") .HasColumnType("tinyint(1)"); + b.Property("IsSend") + .HasColumnType("tinyint(1)"); + b.Property("LastModificationTime") .HasColumnType("datetime(6)"); @@ -3562,6 +3589,9 @@ namespace YunDa.ISAS.Migrations b.Property("RecodeDate") .HasColumnType("datetime(6)"); + b.Property("Remark") + .HasColumnType("longtext"); + b.Property("SeqNo") .HasColumnType("int"); diff --git a/src/YunDa.Quick/MigratorForDB/Program.cs b/src/YunDa.Quick/MigratorForDB/Program.cs index 2eed1cc..ff766fb 100644 --- a/src/YunDa.Quick/MigratorForDB/Program.cs +++ b/src/YunDa.Quick/MigratorForDB/Program.cs @@ -3,10 +3,7 @@ using Abp.Castle.Logging.Log4Net; using Abp.Collections.Extensions; using Abp.Dependency; using Castle.Facilities.Logging; -using MiniDumpLib; using System; -using System.IO; -using System.Security.Permissions; using YunDa.ISAS.Core;