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.WarehouseExecutionSystem.Models { /// <summary>
/// 緊急應變請求類別
/// </summary>
public class TW017EmergencyEventRequestDto : CommonMessage { /// <summary>
/// 緊急事件類別
/// </summary>
/// <value>
/// 0 = Earthquake
/// 1 = Fire
/// </value>
[Required, JsonPropertyName("event_type"), JsonPropertyOrder(101)] public EmergencyEvent EventType { get; set; } /// <summary>
/// 取得緊急應變請求
/// </summary>
/// <param name="transName">交易名稱</param>
/// <param name="eventType">緊急事件類別</param>
/// <returns>緊急應變請求</returns>
public static TW017EmergencyEventRequestDto Get(TransactionName transName, EmergencyEvent eventType) { return new TW017EmergencyEventRequestDto() { Timetick = DateTime.Now, TransactionName = transName.ToTransactionName(), EventType = eventType }; } } /// <summary>
/// 緊急應變回應類別
/// </summary>
public class FW018EmergencyEventResponseDto : CommonMessage { /// <summary>
/// 緊急事件類別
/// </summary>
/// <value>
/// 0 = Earthquake
/// 1 = Fire
/// </value>
[Required, JsonPropertyName("event_type"), JsonPropertyOrder(101)] public EmergencyEvent EventType { get; set; } /// <summary>
/// 結果代碼
/// </summary>
/// <value>
/// 0 = Success <br/>
/// 1 = Failed <br/>
/// </value>
[Required, JsonPropertyName("result_code"), JsonPropertyOrder(102)] public EmergencyEventResultCode ResultCode { get; set; } /// <summary>
/// 取得緊急應變回應
/// </summary>
/// <param name="transName">交易名稱</param>
/// <param name="eventType">事件類別</param>
/// <param name="resultCode">結果代碼</param>
/// <returns>緊急應變回應</returns>
public static FW018EmergencyEventResponseDto Get(TransactionName transName, EmergencyEvent eventType, EmergencyEventResultCode resultCode) { return new FW018EmergencyEventResponseDto() { Timetick = DateTime.Now, TransactionName = transName.ToTransactionName(), EventType = eventType, ResultCode = resultCode }; } } }
|