WMS/HHWMS.Web/Models/DeviceData/DeviceCurrentState.cs

47 lines
2.0 KiB
C#

using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using WalkingTec.Mvvm.Core;
namespace HHWMS.Web.Models
{
[Table("DeviceCurrentState")]
[Display(Name = "DeviceCurrentState", Description = "设备当前状态")]
public class DeviceCurrentState : BasePoco
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public new int ID { get; set; }
[Display(Name = "DeviceCurrentState.DeviceId", Description = "设备唯一标识")]
[StringLength(100, ErrorMessage = "Validate.{0}stringmax{1}")]
[Required(ErrorMessage = "Validate.{0}required")]
public string DeviceId { get; set; }
[Display(Name = "DeviceCurrentState.DeviceName", Description = "设备显示名称")]
[StringLength(100, ErrorMessage = "Validate.{0}stringmax{1}")]
public string DeviceName { get; set; }
[Display(Name = "DeviceCurrentState.DeviceType", Description = "设备类型")]
[StringLength(30, ErrorMessage = "Validate.{0}stringmax{1}")]
public string DeviceType { get; set; }
[Display(Name = "DeviceCurrentState.Status", Description = "当前状态")]
[StringLength(30, ErrorMessage = "Validate.{0}stringmax{1}")]
public string Status { get; set; }
[Display(Name = "DeviceCurrentState.LastPayloadTime", Description = "最后设备数据时间")]
public DateTime? LastPayloadTime { get; set; }
[Display(Name = "DeviceCurrentState.LastUpdateTime", Description = "最后状态更新时间")]
public DateTime? LastUpdateTime { get; set; }
[Display(Name = "DeviceCurrentState.AlarmSummary", Description = "当前告警摘要")]
[StringLength(500, ErrorMessage = "Validate.{0}stringmax{1}")]
public string AlarmSummary { get; set; }
[Display(Name = "DeviceCurrentState.RealtimeJson", Description = "清洗后的实时数据")]
public string RealtimeJson { get; set; }
}
}