You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.3 KiB
60 lines
1.3 KiB
using CellularManagement.Domain.Common;
|
|
using CellularManagement.Domain.Entities.Device;
|
|
using MediatR;
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace CellularManagement.Application.Features.Devices.Commands.UpdateDevice;
|
|
|
|
/// <summary>
|
|
/// 更新设备命令
|
|
/// </summary>
|
|
public class UpdateDeviceCommand : IRequest<OperationResult<UpdateDeviceResponse>>
|
|
{
|
|
/// <summary>
|
|
/// 设备ID
|
|
/// </summary>
|
|
[Required]
|
|
public string DeviceId { get; set; }
|
|
|
|
/// <summary>
|
|
/// 设备名称
|
|
/// </summary>
|
|
[Required]
|
|
[MaxLength(100)]
|
|
public string DeviceName { get; set; }
|
|
|
|
/// <summary>
|
|
/// 序列号
|
|
/// </summary>
|
|
[Required]
|
|
[MaxLength(50)]
|
|
public string SerialNumber { get; set; }
|
|
|
|
/// <summary>
|
|
/// 设备描述
|
|
/// </summary>
|
|
[MaxLength(500)]
|
|
public string Description { get; set; }
|
|
|
|
/// <summary>
|
|
/// 协议版本ID
|
|
/// </summary>
|
|
[Required]
|
|
public string ProtocolVersionId { get; set; }
|
|
/// <summary>
|
|
/// IP地址
|
|
/// </summary>
|
|
[Required]
|
|
[MaxLength(45)]
|
|
public string IpAddress { get; private set; } = null!;
|
|
/// <summary>
|
|
/// Agent端口
|
|
/// </summary>
|
|
[Required]
|
|
public int AgentPort { get; set; }
|
|
|
|
/// <summary>
|
|
/// 是否启用
|
|
/// </summary>
|
|
public bool IsEnabled { get; set; } = true;
|
|
}
|