using System; using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization; namespace Mirle.Component.API.ProgrammableLogicController.Models { /// /// 建立電梯命令請求類別 /// public class TP055CreateLifterCommandRequestDto : 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; } /// /// 起始樓層 /// [Required, JsonPropertyName("from"), JsonPropertyOrder(103)] public int From { get; set; } /// /// 目標樓層 /// [Required, JsonPropertyName("to"), JsonPropertyOrder(104)] public int To { get; set; } /// /// 取得建立電梯命令請求 /// /// 交易名稱 /// 軟體編號 /// 當前任務編號 /// 站點編號 /// 起始樓層 /// 目標樓層 /// 建立電梯命令請求 public static TP055CreateLifterCommandRequestDto Get(TransactionName transName, string softwareID, string currentTaskID, string staionID, int from, int to) { return new TP055CreateLifterCommandRequestDto() { Timetick = DateTime.Now, TransactionName = transName.ToTransactionName(), SoftwareID = softwareID, CurrentTaskID = currentTaskID, StationID = staionID, From = from, To = to }; } } /// /// 建立電梯命令回應類別 /// public class FP056CreateLifterCommandResponseDto : CommonMessage { /// /// 當下任務編號 /// /// AGVC 任務編號/SHTC 任務編號 [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 CreateLifterCommandResultCode ResultCode { get; set; } } }