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.
 
 
 
 
 

67 lines
2.4 KiB

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