using System; using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization; namespace Mirle.Component.API.ProgrammableLogicController.Models { /// /// 棧板供收狀態回報類別 /// public class FP017PalletSupplyStatusReportDto : CommonMessage { /// /// 站點編號 /// [Required, StringLength(9), JsonPropertyName("station_id"), JsonPropertyOrder(101)] public string StationID { get; set; } /// /// 棧板狀態 /// /// /// 0 = Full
/// 1 = Empty
///
[Required, JsonPropertyName("pallet_status"), JsonPropertyOrder(102)] public PalletSupplyStatus PalletStatus { get; set; } } /// /// 棧板供應狀態回應類別 /// public class TP018PalletSupplyStatusAckDto : CommonMessage { /// /// 站點編號 /// [Required, StringLength(9), JsonPropertyName("station_id"), JsonPropertyOrder(101)] public string StationID { get; set; } /// /// 回應代碼 /// /// /// 0 = OK
/// 1 = NG
///
[Required, JsonPropertyName("reply_code"), JsonPropertyOrder(102)] public ReplyCode ReplyCode { get; set; } /// /// 取得棧板供應狀態回應 /// /// 交易名稱 /// 軟體編號 /// 站點編號 /// 回應代碼 /// 棧板供應狀態回應 public static TP018PalletSupplyStatusAckDto Get(TransactionName transName, string softwareID, string stationID, ReplyCode replyCode) { return new TP018PalletSupplyStatusAckDto() { Timetick = DateTime.Now, TransactionName = transName.ToTransactionName(), SoftwareID = softwareID, StationID = stationID, ReplyCode = replyCode }; } } }