完成新建设备的单元 测试包括,添加变量表,和添加菜单

This commit is contained in:
2025-07-24 15:07:03 +08:00
parent b0d5db3626
commit ac38128e4d
33 changed files with 497 additions and 416 deletions

View File

@@ -8,7 +8,15 @@ namespace DMS.Application.DTOs;
public class CreateDeviceDto
{
public string Name { get; set; }
public string Description { get; set; }
public ProtocolType Protocol { get; set; }
public string IpAddress { get; set; }
public int Port { get; set; }
public int Rack { get; set; }
public int Slot { get; set; }
public string CpuType { get; set; }
public DeviceType DeviceType { get; set; }
public string OpcUaServerUrl { get; set; }
public bool IsActive { get; set; }
}

View File

@@ -7,5 +7,7 @@ public class CreateDeviceWithDetailsDto
{
public CreateDeviceDto Device { get; set; }
public VariableTableDto VariableTable { get; set; }
// public MenuBeanDto Menu { get; set; } // 如果需要包含菜单信息
public MenuBeanDto DeviceMenu { get; set; } // 如果需要包含菜单信息
public MenuBeanDto VariableTableMenu { get; set; } // 如果需要包含菜单信息
}

View File

@@ -7,7 +7,7 @@ public class DeviceDto
{
public int Id { get; set; }
public string Name { get; set; }
public string Protocol { get; set; }
public ProtocolType Protocol { get; set; }
public string IpAddress { get; set; }
public int Port { get; set; }
public int Rack { get; set; }

View File

@@ -1,3 +1,5 @@
using DMS.Core.Enums;
namespace DMS.Application.DTOs;
/// <summary>
@@ -9,7 +11,15 @@ public class MenuBeanDto
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; }
}