2025-06-22 21:00:06 +08:00
|
|
|
using System.Collections.ObjectModel;
|
2025-06-12 18:41:46 +08:00
|
|
|
using CommunityToolkit.Mvvm.ComponentModel;
|
2025-06-20 18:53:29 +08:00
|
|
|
using PMSWPF.Enums;
|
|
|
|
|
using SqlSugar;
|
|
|
|
|
using SqlSugar.DbConvert;
|
2025-06-12 18:41:46 +08:00
|
|
|
|
2025-06-10 22:13:06 +08:00
|
|
|
namespace PMSWPF.Models;
|
|
|
|
|
|
2025-06-12 18:41:46 +08:00
|
|
|
public partial class Device:ObservableObject
|
2025-06-10 22:13:06 +08:00
|
|
|
{
|
2025-06-12 18:41:46 +08:00
|
|
|
[ObservableProperty]
|
|
|
|
|
private int id;
|
|
|
|
|
[ObservableProperty]
|
|
|
|
|
private string name;
|
|
|
|
|
[ObservableProperty]
|
|
|
|
|
private string description ;
|
|
|
|
|
[ObservableProperty]
|
|
|
|
|
private string ip ;
|
|
|
|
|
[ObservableProperty]
|
2025-06-20 18:53:29 +08:00
|
|
|
private bool isActive =true;
|
2025-06-12 18:41:46 +08:00
|
|
|
[ObservableProperty]
|
|
|
|
|
private bool isRuning ;
|
2025-06-20 18:53:29 +08:00
|
|
|
[SugarColumn(ColumnDataType="varchar(20)",SqlParameterDbType=typeof(EnumToStringConvert))]
|
|
|
|
|
public DeviceType DeviceType { get; set; }
|
|
|
|
|
|
2025-06-22 21:00:06 +08:00
|
|
|
public List<VariableTable>? VariableTables { get; set; }
|
2025-06-20 18:53:29 +08:00
|
|
|
public ProtocolType ProtocolType { get; set; }
|
2025-06-10 22:13:06 +08:00
|
|
|
|
|
|
|
|
}
|