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/EditIoTDataModel.cs

76 lines
2.2 KiB

using Infrastructure.Application;
using Application.Domain.Entities;
using IoT.Shared.Areas.IoTCenter.Controlls;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;
namespace IoT.Shared.Application.Models
{
[Display(Name = "数据")]
public class EditIoTDataModel : EditModel
{
[ReadOnlyForEdit]
[Display(Name = "产品")]
[SelectList]
public Guid? IoTProductId { get; set; }
[Display(Name = "网关")]
[ReadOnlyForEdit]
[SelectList(nameof(IoTDeviceId), nameof(AjaxBaseController.GetIoTDevice))]
public Guid? IoTGatewayId { get; set; }
[Display(Name = "设备")]
[ReadOnlyForEdit]
[SelectList]
public Guid? IoTDeviceId { 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? DataType { get; set; }
[Display(Name = "数值类型")]
[ReadOnlyForEdit]
[Required(ErrorMessage = nameof(RequiredAttribute))]
public IoTValueType? ValueType { get; set; }
[SkipSearch]
[SkipList]
[Display(Name = "对象模式")]
[Description("描述枚举、对象和数组的类型定义")]
public string ValueSchema { 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; }
}
}