完成新建设备的单元 测试包括,添加变量表,和添加菜单
This commit is contained in:
@@ -5,6 +5,5 @@ public enum MenuType
|
||||
MainMenu,
|
||||
DeviceMenu,
|
||||
VariableTableMenu,
|
||||
AddVariableTableMenu,
|
||||
MqttMenu
|
||||
}
|
||||
@@ -49,6 +49,11 @@ public interface IRepositoryManager : IDisposable
|
||||
/// </summary>
|
||||
IUserRepository Users { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 初始化数据库
|
||||
/// </summary>
|
||||
IInitializeRepository InitializeRepository { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 开始一个新的数据库事务。
|
||||
/// </summary>
|
||||
|
||||
10
DMS.Core/Interfaces/Repositories/IInitializeRepository.cs
Normal file
10
DMS.Core/Interfaces/Repositories/IInitializeRepository.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace DMS.Core.Interfaces.Repositories;
|
||||
|
||||
public interface IInitializeRepository
|
||||
{
|
||||
void InitializeTables();
|
||||
void InitializeTableIndex();
|
||||
bool IsAnyTable(string tableName);
|
||||
bool IsAnyIndex(string indexName);
|
||||
void InitializeMenus();
|
||||
}
|
||||
@@ -62,4 +62,7 @@ public class Device
|
||||
/// 此设备包含的变量表集合。
|
||||
/// </summary>
|
||||
public List<VariableTable> VariableTables { get; set; } = new();
|
||||
|
||||
public string CpuType { get; set; }
|
||||
public DeviceType DeviceType { get; set; }
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
using DMS.Core.Enums;
|
||||
|
||||
namespace DMS.Core.Models;
|
||||
|
||||
/// <summary>
|
||||
@@ -9,7 +11,15 @@ public class MenuBean
|
||||
public int? ParentId { get; set; }
|
||||
public string Header { get; set; }
|
||||
public string Icon { get; set; }
|
||||
public string TargetViewKey { get; set; }
|
||||
/// <summary>
|
||||
/// 菜单的类型,例如菜单关联的是设备,还是变量表,或者是MQTT
|
||||
/// </summary>
|
||||
public MenuType MenuType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 菜单关联的数据ID,例如设备Id,变量表Id
|
||||
/// </summary>
|
||||
public int TargetId { get; set; }
|
||||
public string NavigationParameter { get; set; }
|
||||
public int DisplayOrder { get; set; }
|
||||
}
|
||||
@@ -27,7 +27,7 @@ public class Variable
|
||||
/// <summary>
|
||||
/// 在设备中的地址 (例如: DB1.DBD0, M100.0)。
|
||||
/// </summary>
|
||||
public string Address { get; set; }
|
||||
public string S7Address { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 变量的信号类型,例如启动信号、停止信号。
|
||||
|
||||
Reference in New Issue
Block a user