2025-09-02 21:06:39 +08:00
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace DMS.Application.DTOs.Events
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 设备变更事件参数
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class DeviceChangedEventArgs : System.EventArgs
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 变更类型
|
|
|
|
|
/// </summary>
|
|
|
|
|
public DataChangeType ChangeType { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2025-09-02 21:50:27 +08:00
|
|
|
/// 设备DTO
|
2025-09-02 21:06:39 +08:00
|
|
|
/// </summary>
|
2025-09-02 21:50:27 +08:00
|
|
|
public DeviceDto Device { get; }
|
2025-09-02 21:06:39 +08:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 变更时间
|
|
|
|
|
/// </summary>
|
|
|
|
|
public DateTime ChangeTime { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 构造函数
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="changeType">变更类型</param>
|
2025-09-02 21:50:27 +08:00
|
|
|
/// <param name="device">设备DTO</param>
|
|
|
|
|
public DeviceChangedEventArgs(DataChangeType changeType, DeviceDto device)
|
2025-09-02 21:06:39 +08:00
|
|
|
{
|
|
|
|
|
ChangeType = changeType;
|
2025-09-02 21:50:27 +08:00
|
|
|
Device = device;
|
2025-09-02 21:06:39 +08:00
|
|
|
ChangeTime = DateTime.Now;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|