Update display allarme
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
#nullable disable
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
namespace MP.Data.DatabaseModels
|
||||
{
|
||||
[Table("AlarmLog")]
|
||||
public partial class AlarmLogModel
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int AlarmLogId { get; set; } = 0;
|
||||
public DateTime DtRif { get; set; } = DateTime.Now;
|
||||
public decimal Duration { get; set; } = 0;
|
||||
public string MachineId { get; set; } = "";
|
||||
public string MemAddress { get; set; } = "";
|
||||
public int MemIndex { get; set; } = 0;
|
||||
public int StatusVal { get; set; } = 0;
|
||||
public string ValDecoded { get; set; } = "";
|
||||
public DateTime DtNotify { get; set; } = DateTime.Now;
|
||||
public string UserAck { get; set; } = "";
|
||||
public DateTime DtAck { get; set; } = DateTime.Now;
|
||||
|
||||
[NotMapped]
|
||||
public int ReqNotify
|
||||
{
|
||||
get => Duration > 1 && DtNotify < DtRif ? 1 : 0;
|
||||
}
|
||||
[NotMapped]
|
||||
public int ReqAck
|
||||
{
|
||||
get => DtNotify > DtRif && DtAck < DtRif ? 1 : 0;
|
||||
}
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user