using System; using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization; namespace Mirle.Component.API.ProgrammableLogicController.Models { /// /// 使用維修門請求 /// public class FP031UseRapairDoorRequestDto : CommonMessage { /// /// 站點編號 /// [Required, StringLength(9), JsonPropertyName("stationd_id"), JsonPropertyOrder(101)] public string StationID { get; set; } /// /// 維修門編號 /// [Required, StringLength(9), JsonPropertyName("repair_door_id"), JsonPropertyOrder(102)] public string RepairDoorID { get; set; } /// /// 動作模式 /// /// /// 0 = Open
/// 1 = Close
///
[Required, JsonPropertyName("action_mode"), JsonPropertyOrder(103)] public RepairDoorActionMode ActionMode { get; set; } } /// /// 使用維修門回應類別 /// public class TP032UseRepairDoorResponseDto : CommonMessage { /// /// 站點編號 /// [Required, StringLength(9), JsonPropertyName("station_id"), JsonPropertyOrder(101)] public string StationID { get; set; } /// /// 維修門編號 /// [Required, StringLength(9), JsonPropertyName("repair_door_id"), JsonPropertyOrder(102)] public string RepairDoorID { get; set; } /// /// 動作模式 /// /// /// 0 = Open
/// 1 = Close
///
[Required, JsonPropertyName("action_mode"), JsonPropertyOrder(103)] public RepairDoorActionMode ActionMode { get; set; } /// /// 結果代碼 /// /// /// 0 = Success
/// 1 = Repair Door Not Exist
///
[Required, JsonPropertyName("result_code"), JsonPropertyOrder(104)] public UseRepairDoorResultCode ResultCode { get; set; } /// /// 取得使用維修門回應 /// /// 交易名稱 /// 軟體編號 /// 站點編號 /// 維修門編號 /// 動作模式 /// 使用維修門回應 /// 使用維修門回應 public static TP032UseRepairDoorResponseDto Get(TransactionName transName, string softwareID, string stationID, string reapirDoorID, RepairDoorActionMode actionMode, UseRepairDoorResultCode resultCode) { return new TP032UseRepairDoorResponseDto() { Timetick = DateTime.Now, TransactionName = transName.ToTransactionName(), SoftwareID = softwareID, StationID = stationID, RepairDoorID = reapirDoorID, ActionMode = actionMode, ResultCode = resultCode }; } } }