using System; using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization; namespace Mirle.Component.API.ProgrammableLogicController.Models { /// /// 移動台車狀態請求類別 /// public class TP019MoveCarStatusRequestDto : CommonMessage { /// /// 當下任務編號 /// /// 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 TP019MoveCarStatusRequestDto Get(TransactionName transName, string softwareID, string currentTaskID, string stationID) { return new TP019MoveCarStatusRequestDto() { Timetick = DateTime.Now, TransactionName = transName.ToTransactionName(), SoftwareID = softwareID, CurrentTaskID = currentTaskID, StationID = stationID }; } } /// /// 移動台車狀態回應類別 /// public class FP020MoveCarStatusResponseDto : CommonMessage { /// /// 當下任務編號 /// /// 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 = Ready
/// 1 = Not Ready
///
[Required, JsonPropertyName("move_car_status"), JsonPropertyOrder(103)] public MoveCarStatus MoveCarStatus { get; set; } /// /// 結果代碼 /// /// /// 0 = Success
/// 1 = Reject
///
[Required, JsonPropertyName("result_code"), JsonPropertyOrder(104)] public MoveCarResultCode ResultCode { get; set; } } }