2021-12-12 14:55:48 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
2024-07-19 09:23:04 +08:00
|
|
|
|
using System.Runtime.CompilerServices;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
2021-12-12 14:55:48 +08:00
|
|
|
|
using WalkingTec.Mvvm.Core;
|
|
|
|
|
|
|
|
|
|
namespace IoTGateway.Model
|
|
|
|
|
{
|
2024-07-19 09:23:04 +08:00
|
|
|
|
[Comment("设备维护")]
|
|
|
|
|
[Index(nameof(DeviceName))]
|
|
|
|
|
[Index(nameof(AutoStart))]
|
|
|
|
|
[Index(nameof(DeviceTypeEnum))]
|
2021-12-12 14:55:48 +08:00
|
|
|
|
public class Device : TreePoco<Device>, IBasePoco
|
|
|
|
|
{
|
2024-07-19 09:23:04 +08:00
|
|
|
|
[Comment("名称")]
|
2024-01-08 22:18:16 +08:00
|
|
|
|
[Display(Name = "DeviceName")]
|
2021-12-12 14:55:48 +08:00
|
|
|
|
public string DeviceName { get; set; }
|
|
|
|
|
|
2024-07-19 09:23:04 +08:00
|
|
|
|
[Comment("排序")]
|
2023-12-23 19:23:22 +08:00
|
|
|
|
[Display(Name = "Sort")]
|
2021-12-12 14:55:48 +08:00
|
|
|
|
public uint Index { get; set; }
|
|
|
|
|
|
2024-07-19 09:23:04 +08:00
|
|
|
|
[Comment("描述")]
|
2023-12-23 19:23:22 +08:00
|
|
|
|
[Display(Name = "Description")]
|
2021-12-12 14:55:48 +08:00
|
|
|
|
public string Description { get; set; }
|
|
|
|
|
|
|
|
|
|
public Driver Driver { get; set; }
|
2024-07-19 09:23:04 +08:00
|
|
|
|
[Comment("驱动")]
|
2024-01-08 22:18:16 +08:00
|
|
|
|
[Display(Name = "Driver")]
|
2021-12-12 14:55:48 +08:00
|
|
|
|
public Guid? DriverId { get; set; }
|
|
|
|
|
|
2024-07-19 09:23:04 +08:00
|
|
|
|
[Comment("启动")]
|
2024-01-08 22:18:16 +08:00
|
|
|
|
[Display(Name = "AutoStart")]
|
2021-12-12 14:55:48 +08:00
|
|
|
|
public bool AutoStart { get; set; }
|
|
|
|
|
|
2024-07-19 09:23:04 +08:00
|
|
|
|
[Comment("变化上传")]
|
2024-01-08 22:18:16 +08:00
|
|
|
|
[Display(Name = "ChangeUpload")]
|
2022-05-17 13:45:12 +08:00
|
|
|
|
public bool CgUpload { get; set; }
|
|
|
|
|
|
2024-07-19 09:23:04 +08:00
|
|
|
|
[Comment("归档周期ms")]
|
2024-01-08 22:18:16 +08:00
|
|
|
|
[Display(Name = "EnforcePeriodms")]
|
2022-05-17 13:45:12 +08:00
|
|
|
|
public uint EnforcePeriod { get; set; }
|
|
|
|
|
|
2024-07-19 09:23:04 +08:00
|
|
|
|
[Comment("指令间隔ms")]
|
2024-01-08 22:18:16 +08:00
|
|
|
|
[Display(Name = "CmdPeriodms")]
|
2022-10-12 14:35:45 +08:00
|
|
|
|
public uint CmdPeriod { get; set; }
|
|
|
|
|
|
2024-07-19 09:23:04 +08:00
|
|
|
|
[Comment("类型(组或设备)")]
|
2024-01-08 22:18:16 +08:00
|
|
|
|
[Display(Name = "Type")]
|
2021-12-12 14:55:48 +08:00
|
|
|
|
public DeviceTypeEnum DeviceTypeEnum { get; set; }
|
|
|
|
|
|
2024-01-08 22:18:16 +08:00
|
|
|
|
[Display(Name = "CreateTime")]
|
2021-12-12 14:55:48 +08:00
|
|
|
|
public DateTime? CreateTime { get; set; }
|
2024-01-08 22:18:16 +08:00
|
|
|
|
[Display(Name = "CreateBy")]
|
2021-12-12 14:55:48 +08:00
|
|
|
|
public string CreateBy { get; set; }
|
2024-01-08 22:18:16 +08:00
|
|
|
|
[Display(Name = "UpdateTime")]
|
2021-12-12 14:55:48 +08:00
|
|
|
|
public DateTime? UpdateTime { get; set; }
|
2024-01-08 22:18:16 +08:00
|
|
|
|
[Display(Name = "UpdateBy")]
|
2021-12-12 14:55:48 +08:00
|
|
|
|
public string UpdateBy { get; set; }
|
|
|
|
|
|
|
|
|
|
public List<DeviceConfig> DeviceConfigs { get; set; }
|
|
|
|
|
public List<DeviceVariable> DeviceVariables { get; set; }
|
|
|
|
|
}
|
|
|
|
|
}
|