45 lines
1.8 KiB
C#
45 lines
1.8 KiB
C#
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using WalkingTec.Mvvm.Core;
|
|
|
|
namespace HHWMS.Web.Models
|
|
{
|
|
[Table("DeviceAlarmRecord")]
|
|
[Display(Name = "DeviceAlarmRecord", Description = "设备告警记录")]
|
|
public class DeviceAlarmRecord : BasePoco
|
|
{
|
|
[Key]
|
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
public new int ID { get; set; }
|
|
|
|
[Display(Name = "DeviceAlarmRecord.DeviceId", Description = "设备唯一标识")]
|
|
[StringLength(100, ErrorMessage = "Validate.{0}stringmax{1}")]
|
|
[Required(ErrorMessage = "Validate.{0}required")]
|
|
public string DeviceId { get; set; }
|
|
|
|
[Display(Name = "DeviceAlarmRecord.AlarmCode", Description = "告警代码")]
|
|
[StringLength(100, ErrorMessage = "Validate.{0}stringmax{1}")]
|
|
public string AlarmCode { get; set; }
|
|
|
|
[Display(Name = "DeviceAlarmRecord.AlarmMessage", Description = "告警内容")]
|
|
[StringLength(500, ErrorMessage = "Validate.{0}stringmax{1}")]
|
|
public string AlarmMessage { get; set; }
|
|
|
|
[Display(Name = "DeviceAlarmRecord.StartTime", Description = "告警开始时间")]
|
|
public DateTime StartTime { get; set; }
|
|
|
|
[Display(Name = "DeviceAlarmRecord.EndTime", Description = "告警恢复时间")]
|
|
public DateTime? EndTime { get; set; }
|
|
|
|
[Display(Name = "DeviceAlarmRecord.IsActive", Description = "是否仍在告警")]
|
|
public bool IsActive { get; set; }
|
|
|
|
[Display(Name = "DeviceAlarmRecord.LastSeenTime", Description = "最后出现时间")]
|
|
public DateTime? LastSeenTime { get; set; }
|
|
|
|
[Display(Name = "DeviceAlarmRecord.RepeatCount", Description = "重复出现次数")]
|
|
public int RepeatCount { get; set; }
|
|
}
|
|
}
|