using System; using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization; namespace Mirle.Component.API.ProgrammableLogicController.Models { /// /// 清除異常回報類別 /// public class FP029ResetAlarmReportDto : CommonMessage { /// /// 異常代碼 /// [Required, StringLength(10), JsonPropertyName("alarm_code"), JsonPropertyOrder(101)] public string AlarmCode { get; set; } /// /// 設備編號 /// [Required, StringLength(10), JsonPropertyName("vehicle_id"), JsonPropertyOrder(102)] public string VehicleID { get; set; } /// /// 異常清除時間 /// [Required, JsonPropertyName("end_time"), JsonPropertyOrder(103)] public DateTime EndTime { get; set; } } /// /// 清除異常回應類別 /// public class TP030ResetAlarmAckDto : CommonMessage { /// /// 異常代碼 /// [Required, StringLength(10), JsonPropertyName("alarm_code"), JsonPropertyOrder(101)] public string AlarmCode { get; set; } /// /// 回應代碼 /// /// /// 0 = OK
/// 1 = NG
///
[Required, JsonPropertyName("reply_code"), JsonPropertyOrder(102)] public ReplyCode ReplyCode { get; set; } /// /// 取得清除異常回應 /// /// 交易名稱 /// 軟體編號 /// 任務編號 /// 異常代碼 /// 回應代碼 /// 清除異常回應 public static TP030ResetAlarmAckDto Get(TransactionName transName, string softwareID, string taskID, string alarmCode, ReplyCode replyCode) { return new TP030ResetAlarmAckDto() { Timetick = DateTime.Now, TransactionName = transName.ToTransactionName(), SoftwareID = softwareID, TaskID = taskID, AlarmCode = alarmCode, ReplyCode = replyCode }; } } }