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.
63 lines
1.8 KiB
63 lines
1.8 KiB
using Infrastructure.Application;
|
|
using IoT.Shared.Application.Domain.Entities;
|
|
using IoT.Shared.Areas.IoTCenter.Controlls;
|
|
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace IoT.Shared.Application.Models
|
|
{
|
|
[Display(Name = "数据")]
|
|
public class EditIoTDataModel : EditModel
|
|
{
|
|
[ReadOnlyForEdit]
|
|
[Display(Name = "产品")]
|
|
[SelectList]
|
|
public Guid? ProductId { get; set; }
|
|
|
|
[Display(Name = "网关")]
|
|
[ReadOnlyForEdit]
|
|
[SelectList(nameof(DeviceId),nameof(AjaxBaseController.GetIoTDevice))]
|
|
public Guid? IoTGatewayId { 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; }
|
|
}
|
|
}
|