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.

60 lines
2.0 KiB

8 months ago
  1. using System;
  2. using System.ComponentModel.DataAnnotations;
  3. using System.Text.Json.Serialization;
  4. namespace Mirle.Component.API.ProgrammableLogicController.Models
  5. {
  6. /// <summary>
  7. /// 消防警訊通知回報類別
  8. /// </summary>
  9. public class FP049FireAlarmNotifyReportDto : CommonMessage
  10. {
  11. /// <summary>
  12. /// 取得消防警訊通知回報
  13. /// </summary>
  14. /// <param name="transName">交易名稱</param>
  15. /// <param name="softwareID">軟體編號</param>
  16. /// <returns>消防警訊通知回報</returns>
  17. public static FP049FireAlarmNotifyReportDto Get(TransactionName transName, string softwareID)
  18. {
  19. return new FP049FireAlarmNotifyReportDto()
  20. {
  21. Timetick = DateTime.Now,
  22. TransactionName = transName.ToTransactionName(),
  23. SoftwareID = softwareID
  24. };
  25. }
  26. }
  27. /// <summary>
  28. /// 消防警訊通知回應類別
  29. /// </summary>
  30. public class TP050FireAlarmNotifyAckDto : CommonMessage
  31. {
  32. /// <summary>
  33. /// 結果代碼
  34. /// </summary>
  35. /// <value>
  36. /// 0 = OK <br/>
  37. /// 1 = NG <br/>
  38. /// </value>
  39. [Required, JsonPropertyName("reply_code"), JsonPropertyOrder(101)]
  40. public ReplyCode ReplyCode { get; set; }
  41. /// <summary>
  42. /// 取得消防警訊通知回應
  43. /// </summary>
  44. /// <param name="transName">交易名稱</param>
  45. /// <param name="softwareID">軟體編號</param>
  46. /// <param name="replyCode">回應代碼</param>
  47. /// <returns>消防警訊通知回應</returns>
  48. public static TP050FireAlarmNotifyAckDto Get(TransactionName transName, string softwareID, ReplyCode replyCode)
  49. {
  50. return new TP050FireAlarmNotifyAckDto()
  51. {
  52. Timetick = DateTime.Now,
  53. TransactionName = transName.ToTransactionName(),
  54. SoftwareID = softwareID,
  55. ReplyCode = replyCode
  56. };
  57. }
  58. }
  59. }