iotgateway/IoTGateway.Model/Device.cs

66 lines
2.0 KiB
C#
Raw Permalink Normal View History

2021-12-12 14:55:48 +08:00
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Runtime.CompilerServices;
using Microsoft.EntityFrameworkCore;
2021-12-12 14:55:48 +08:00
using WalkingTec.Mvvm.Core;
namespace IoTGateway.Model
{
[Comment("设备维护")]
[Index(nameof(DeviceName))]
[Index(nameof(AutoStart))]
[Index(nameof(DeviceTypeEnum))]
2021-12-12 14:55:48 +08:00
public class Device : TreePoco<Device>, IBasePoco
{
[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; }
[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; }
[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; }
[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; }
[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; }
[Comment("变化上传")]
2024-01-08 22:18:16 +08:00
[Display(Name = "ChangeUpload")]
public bool CgUpload { get; set; }
[Comment("归档周期ms")]
2024-01-08 22:18:16 +08:00
[Display(Name = "EnforcePeriodms")]
public uint EnforcePeriod { get; set; }
[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; }
[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; }
}
}