You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
iot/projects/IoT.Shared/Application/Models/EditDataModel.cs

58 lines
1.6 KiB

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