Files
DMS/DMS.WPF/ViewModels/Items/MqttServerItemViewModel.cs

60 lines
1.2 KiB
C#
Raw Normal View History

2025-07-26 10:05:43 +08:00
using CommunityToolkit.Mvvm.ComponentModel;
using DMS.Application.DTOs;
using System;
using System.Collections.ObjectModel;
using System.Linq;
2025-07-26 10:05:43 +08:00
namespace DMS.WPF.ViewModels.Items;
public partial class MqttServerItemViewModel : ObservableObject
{
2025-07-30 12:09:00 +08:00
public int Id { get; set; }
2025-07-26 10:05:43 +08:00
[ObservableProperty]
private string _serverName;
[ObservableProperty]
2025-09-06 12:03:39 +08:00
private string _serverUrl;
2025-07-26 10:05:43 +08:00
[ObservableProperty]
private int _port;
[ObservableProperty]
private string _username;
[ObservableProperty]
private string _password;
[ObservableProperty]
private bool _isActive;
[ObservableProperty]
private bool _isConnect;
2025-07-26 10:05:43 +08:00
[ObservableProperty]
private string _subscribeTopic;
[ObservableProperty]
private string _publishTopic;
[ObservableProperty]
private string _clientId;
[ObservableProperty]
private DateTime _createdAt;
[ObservableProperty]
private DateTime? _connectedAt;
[ObservableProperty]
private long _connectionDuration;
[ObservableProperty]
private string _messageFormat;
[ObservableProperty]
private ObservableCollection<VariableMqttAliasItemViewModel> _variableAliases = new();
2025-07-28 11:08:56 +08:00
2025-07-26 10:05:43 +08:00
}