using System;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
namespace Mirle.Component.API.ProgrammableLogicController.Models
{
///
/// 檢查電梯貨物回報類別
///
public class TP025CheckLifterItemReportDto : CommonMessage
{
///
/// 當下任務編號
///
/// A[YYYYMMDDHH][Sequnce * 5]/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; }
///
/// 當前所在樓層
///
[Required, JsonPropertyName("floor"), JsonPropertyOrder(103)]
public int Floor { get; set; }
///
/// 電梯內貨物狀態
///
[Required, JsonPropertyName("lifter_item_status"), JsonPropertyOrder(104)]
public LifterItemStatus LifterItemStatus { get; set; }
///
/// 取得檢查電梯貨物回報
///
/// 交易名稱
/// 軟體編號
/// 當下任務編號
/// 站點編號
/// 所在樓層
/// 電梯內貨物狀態
/// 檢查電梯貨物回報
public static TP025CheckLifterItemReportDto Get(TransactionName transName, string softwareID,
string currentTaskID, string stationID, int floor, LifterItemStatus lifterItemStatus)
{
return new TP025CheckLifterItemReportDto()
{
Timetick = DateTime.Now,
TransactionName = transName.ToTransactionName(),
SoftwareID = softwareID,
CurrentTaskID = currentTaskID,
StationID = stationID,
Floor = floor,
LifterItemStatus = lifterItemStatus
};
}
}
///
/// 檢查電梯貨物回應類別
///
public class FP026CheckLifterItemAckDto : CommonMessage
{
///
/// 當下任務編號
///
/// A[YYYYMMDDHH][Sequnce * 5]/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; }
///
/// 當前所在樓層
///
[Required, JsonPropertyName("floor"), JsonPropertyOrder(103)]
public int Floor { get; set; }
///
/// 電梯貨物狀態
///
///
/// 0 = Have Item
/// 1 = Haven't Item
///
[Required, JsonPropertyName("lifter_item_status"), JsonPropertyOrder(104)]
public LifterItemStatus LiftItemStatus { get; set; }
///
/// 回應代碼
///
///
/// 0 = OK
/// 1 = NG
///
[Required, JsonPropertyName("reply_code"), JsonPropertyOrder(105)]
public ReplyCode ReplyCode { get; set; }
}
}