You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
90 lines
3.3 KiB
90 lines
3.3 KiB
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace Mirle.Component.API.ProgrammableLogicController.Models
|
|
{
|
|
/// <summary>
|
|
/// 使用維修門請求
|
|
/// </summary>
|
|
public class FP031UseRapairDoorRequestDto : CommonMessage
|
|
{
|
|
/// <summary>
|
|
/// 站點編號
|
|
/// </summary>
|
|
[Required, StringLength(9), JsonPropertyName("stationd_id"), JsonPropertyOrder(101)]
|
|
public string StationID { get; set; }
|
|
/// <summary>
|
|
/// 維修門編號
|
|
/// </summary>
|
|
[Required, StringLength(9), JsonPropertyName("repair_door_id"), JsonPropertyOrder(102)]
|
|
public string RepairDoorID { get; set; }
|
|
/// <summary>
|
|
/// 動作模式
|
|
/// </summary>
|
|
/// <value>
|
|
/// 0 = Open <br/>
|
|
/// 1 = Close <br/>
|
|
/// </value>
|
|
[Required, JsonPropertyName("action_mode"), JsonPropertyOrder(103)]
|
|
public RepairDoorActionMode ActionMode { get; set; }
|
|
}
|
|
/// <summary>
|
|
/// 使用維修門回應類別
|
|
/// </summary>
|
|
public class TP032UseRepairDoorResponseDto : CommonMessage
|
|
{
|
|
/// <summary>
|
|
/// 站點編號
|
|
/// </summary>
|
|
[Required, StringLength(9), JsonPropertyName("station_id"), JsonPropertyOrder(101)]
|
|
public string StationID { get; set; }
|
|
/// <summary>
|
|
/// 維修門編號
|
|
/// </summary>
|
|
[Required, StringLength(9), JsonPropertyName("repair_door_id"), JsonPropertyOrder(102)]
|
|
public string RepairDoorID { get; set; }
|
|
/// <summary>
|
|
/// 動作模式
|
|
/// </summary>
|
|
/// <value>
|
|
/// 0 = Open <br/>
|
|
/// 1 = Close <br/>
|
|
/// </value>
|
|
[Required, JsonPropertyName("action_mode"), JsonPropertyOrder(103)]
|
|
public RepairDoorActionMode ActionMode { get; set; }
|
|
/// <summary>
|
|
/// 結果代碼
|
|
/// </summary>
|
|
/// <value>
|
|
/// 0 = Success <br/>
|
|
/// 1 = Repair Door Not Exist <br/>
|
|
/// </value>
|
|
[Required, JsonPropertyName("result_code"), JsonPropertyOrder(104)]
|
|
public UseRepairDoorResultCode ResultCode { get; set; }
|
|
/// <summary>
|
|
/// 取得使用維修門回應
|
|
/// </summary>
|
|
/// <param name="transName">交易名稱</param>
|
|
/// <param name="softwareID">軟體編號</param>
|
|
/// <param name="stationID">站點編號</param>
|
|
/// <param name="reapirDoorID">維修門編號</param>
|
|
/// <param name="actionMode">動作模式</param>
|
|
/// <param name="resultCode">使用維修門回應</param>
|
|
/// <returns>使用維修門回應</returns>
|
|
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
|
|
};
|
|
}
|
|
}
|
|
}
|