using Application.Domain.Entities; using Infrastructure.Application; using System; using System.ComponentModel; using System.ComponentModel.DataAnnotations; namespace Application.Models { [Display(Name = "数据")] public class EditDataModel : EditModel { [Display(Name = "节点")] [ReadOnly(true)] [DataType("SelectList")] public Guid? NodeId { get; set; } [Display(Name = "设备")] [ReadOnly(true)] [DataType("SelectList")] public Guid? DeviceId { get; set; } [Display(Name = "键")] [ReadOnly(true)] public string Key { get; set; } [Display(Name = "值")] public string Value { get; set; } [Display(Name = "名称")] [ReadOnly(true)] public string Name { get; set; } [Display(Name = "类型")] [ReadOnly(true)] [Required] public DeviceDataType? Type { get; set; } [Display(Name = "单位")] [ReadOnly(true)] public string Unit { get; set; } [Display(Name = "描述")] [ReadOnly(true)] public string Description { get; set; } [Display(Name = "时间戳")] public long Timestamp { get; set; } [Display(Name = "隐藏")] [ReadOnly(true)] public bool Hidden { get; set; } } }