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.
|
|
using System; using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization;
namespace Mirle.Component.API.ProgrammableLogicController.Models { /// <summary>
/// 維修門狀態回報類別
/// </summary>
public class FP035RepairDoorStatusReportDto : CommonMessage { /// <summary>
/// 維修門編號
/// </summary>
[Required, StringLength(9), JsonPropertyName("repair_door_id"), JsonPropertyOrder(101)] public string RepairDoorID { get; set; } /// <summary>
/// 維修門狀態
/// </summary>
/// <value>
/// 0 = Open <br/>
/// 1 = Force Open <br/>
/// 2 = Close <br/>
/// </value>
[Required, JsonPropertyName("repair_door_status"), JsonPropertyOrder(102)] public RepairDoorStatus RepairDoorStatus { get; set; } } /// <summary>
/// 維修門狀態回應類別
/// </summary>
public class TP036RepairDoorStatusAckDto : CommonMessage { /// <summary>
/// 維修門編號
/// </summary>
[Required, StringLength(9), JsonPropertyName("repair_door_id"), JsonPropertyOrder(101)] public string RepairDoorID { get; set; } /// <summary>
/// 維修門狀態
/// </summary>
/// <value>
/// 0 = Open <br/>
/// 1 = Force Open <br/>
/// 2 = Close <br/>
/// </value>
[Required, JsonPropertyName("repair_door_status"), JsonPropertyOrder(102)] public RepairDoorStatus RepairDoorStatus { get; set; } /// <summary>
/// 回應代碼
/// </summary>
/// <value>
/// 0 = OK <br/>
/// 1 = NG <br/>
/// </value>
[Required, JsonPropertyName("reply_code"), JsonPropertyOrder(103)] public ReplyCode ReplyCode { get; set; } /// <summary>
/// 取得維修門狀態回應
/// </summary>
/// <param name="transName">交易名稱</param>
/// <param name="softwareID">軟體編號</param>
/// <param name="repairDoorID">維修門編號</param>
/// <param name="repairDoorStatus">維修門狀態</param>
/// <param name="replyCode">回應代碼</param>
/// <returns>維修門狀態回應</returns>
public static TP036RepairDoorStatusAckDto Get(TransactionName transName, string softwareID, string repairDoorID, RepairDoorStatus repairDoorStatus, ReplyCode replyCode) { return new TP036RepairDoorStatusAckDto() { Timetick = DateTime.Now, TransactionName = transName.ToTransactionName(), SoftwareID = softwareID, RepairDoorID = repairDoorID, RepairDoorStatus = repairDoorStatus, ReplyCode = replyCode }; } } }
|