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

2 months ago
using CellularManagement.Domain.Common;
using CellularManagement.Domain.Entities.Device;
2 months ago
using MediatR;
using System.ComponentModel.DataAnnotations;
namespace CellularManagement.Application.Features.Devices.Commands.UpdateDevice;
/// <summary>
/// 更新设备命令
/// </summary>
public class UpdateDeviceCommand : IRequest<OperationResult<UpdateDeviceResponse>>
2 months ago
{
/// <summary>
/// 设备ID
/// </summary>
[Required]
public string DeviceId { get; set; }
2 months ago
/// <summary>
/// 设备名称
/// </summary>
[Required]
[MaxLength(100)]
2 months ago
public string DeviceName { get; set; }
/// <summary>
/// 序列号
2 months ago
/// </summary>
[Required]
[MaxLength(50)]
public string SerialNumber { get; set; }
2 months ago
/// <summary>
/// 设备描述
2 months ago
/// </summary>
[MaxLength(500)]
public string Description { get; set; }
2 months ago
/// <summary>
/// 协议版本ID
2 months ago
/// </summary>
[Required]
public string ProtocolVersionId { get; set; }
2 months ago
/// <summary>
/// IP地址
2 months ago
/// </summary>
[Required]
[MaxLength(45)]
public string IpAddress { get; private set; } = null!;
2 months ago
/// <summary>
/// Agent端口
2 months ago
/// </summary>
[Required]
public int AgentPort { get; set; }
2 months ago
/// <summary>
/// 是否启用
2 months ago
/// </summary>
public bool IsEnabled { get; set; } = true;
2 months ago
}