梳理了所有的Db,DTO,ItemViewModel的属性
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
using DMS.Core.Enums;
|
||||
|
||||
namespace DMS.Application.DTOs;
|
||||
|
||||
/// <summary>
|
||||
/// 用于创建新设备时传输数据的DTO。
|
||||
/// </summary>
|
||||
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; }
|
||||
}
|
||||
@@ -5,7 +5,7 @@ namespace DMS.Application.DTOs;
|
||||
/// </summary>
|
||||
public class CreateDeviceWithDetailsDto
|
||||
{
|
||||
public CreateDeviceDto Device { get; set; }
|
||||
public DeviceDto Device { get; set; }
|
||||
public VariableTableDto VariableTable { get; set; }
|
||||
|
||||
public MenuBeanDto DeviceMenu { get; set; } // 如果需要包含菜单信息
|
||||
|
||||
@@ -9,12 +9,18 @@ public class DeviceDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
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; }
|
||||
public bool IsRunning { get; set; }
|
||||
public string Status { get; set; } // "在线", "离线", "连接中..."
|
||||
|
||||
public List<VariableTableDto> VariableTables { get; set; }
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace DMS.Application.DTOs;
|
||||
|
||||
@@ -21,4 +22,5 @@ public class MqttServerDto
|
||||
public DateTime? ConnectedAt { get; set; }
|
||||
public long ConnectionDuration { get; set; }
|
||||
public string MessageFormat { get; set; }
|
||||
public List<VariableMqttAliasDto> VariableAliases { get; set; } = new();
|
||||
}
|
||||
@@ -10,12 +10,12 @@ public class VariableDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string? S7Address { get; set; }
|
||||
public string? DataValue { get; set; }
|
||||
public string? DisplayValue { get; set; }
|
||||
public string S7Address { get; set; }
|
||||
public string DataValue { get; set; }
|
||||
public string DisplayValue { get; set; }
|
||||
public VariableTableDto? VariableTable { get; set; }
|
||||
public List<VariableMqttAliasDto>? MqttAliases { get; set; }
|
||||
public SignalType DataType { get; set; }
|
||||
public SignalType SignalType { get; set; }
|
||||
public PollLevelType PollLevel { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
public int VariableTableId { get; set; }
|
||||
@@ -34,4 +34,5 @@ public class VariableDto
|
||||
public string UpdatedBy { get; set; }
|
||||
public bool IsModified { get; set; }
|
||||
public string Description { get; set; }
|
||||
public OpcUaUpdateType OpcUaUpdateType { get; set; }
|
||||
}
|
||||
@@ -13,4 +13,5 @@ public class VariableTableDto
|
||||
public bool IsActive { get; set; }
|
||||
public int DeviceId { get; set; }
|
||||
public ProtocolType Protocol { get; set; }
|
||||
public List<VariableDto> Variables { get; set; } = new();
|
||||
}
|
||||
Reference in New Issue
Block a user