using System; using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization; namespace Mirle.Component.API.ProgrammableLogicController.Models { /// /// 取消電梯命令請求類別 /// public class TP059CancelLifterCommandRequestDto : CommonMessage { /// /// 當下任務編號 /// /// A[YYYYMMDDHH][Sequnce * 5]/S[YYYYMMDDHH][Sequnce * 5] [Required, StringLength(16), JsonPropertyName("current_task_id"), JsonPropertyOrder(101)] public string CurrentTaskID { get; set; } /// /// 站點編號 /// [Required, StringLength(9), JsonPropertyName("station_id"), JsonPropertyOrder(102)] public string StationID { get; set; } /// /// 取得取消電梯命令請求 /// /// 交易名稱 /// 軟體編號 /// 當下任務編號 /// 站點編號 /// 取消電梯命令請求 public static TP059CancelLifterCommandRequestDto Get(TransactionName transName, string softwareID, string currentTaskID, string staionID) { return new TP059CancelLifterCommandRequestDto() { Timetick = DateTime.Now, TransactionName = transName.ToTransactionName(), SoftwareID = softwareID, CurrentTaskID = currentTaskID, StationID = staionID }; } } /// /// 取消電梯命令回應類別 /// public class FP060CancelLifterResponseDto : CommonMessage { /// /// 當下任務編號 /// /// A[YYYYMMDDHH][Sequnce * 5]/S[YYYYMMDDHH][Sequnce * 5] [Required, StringLength(16), JsonPropertyName("current_task_id"), JsonPropertyOrder(101)] public string CurrentTaskID { get; set; } /// /// 站點編號 /// [Required, StringLength(9), JsonPropertyName("station_id"), JsonPropertyOrder(102)] public string StationID { get; set; } /// /// 結果代碼 /// /// /// 0 = Success
/// 1 = Reject
///
[Required, JsonPropertyName("result_code"), JsonPropertyOrder(103)] public CancelLifterCommandResultCode ResultCode { get; set; } } }