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

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 TP033ReleaseRepairDoorReportDto : CommonMessage
  10. {
  11. /// <summary>
  12. /// 維修門編號
  13. /// </summary>
  14. [Required, StringLength(9), JsonPropertyName("repair_door_id"), JsonPropertyOrder(101)]
  15. public string RepairDoorID { get; set; }
  16. /// <summary>
  17. /// 維修門狀態
  18. /// </summary>
  19. /// <value>
  20. /// 0 = Open <br/>
  21. /// 1 = Force Open <br/>
  22. /// 2 = Close
  23. /// </value>
  24. [Required, JsonPropertyName("repair_door_status"), JsonPropertyOrder(102)]
  25. public RepairDoorStatus RepairDoorStatus { get; set; }
  26. /// <summary>
  27. /// 取得釋放維修門回報
  28. /// </summary>
  29. /// <param name="transName">交易名稱</param>
  30. /// <param name="softwareID">軟體編號</param>
  31. /// <param name="repairDoorID">維修門編號</param>
  32. /// <param name="repairDoorStatus">維修門狀態</param>
  33. /// <returns>釋放維修門回報</returns>
  34. public static TP033ReleaseRepairDoorReportDto Get(TransactionName transName, string softwareID, string repairDoorID, RepairDoorStatus repairDoorStatus)
  35. {
  36. return new TP033ReleaseRepairDoorReportDto()
  37. {
  38. Timetick = DateTime.Now,
  39. TransactionName = transName.ToTransactionName(),
  40. SoftwareID = softwareID,
  41. RepairDoorID = repairDoorID,
  42. RepairDoorStatus = repairDoorStatus
  43. };
  44. }
  45. }
  46. /// <summary>
  47. /// 釋放維修門回應類別
  48. /// </summary>
  49. public class FP034ReleaseRepairDoorAckDto : CommonMessage
  50. {
  51. /// <summary>
  52. /// 維修門編號
  53. /// </summary>
  54. [Required, StringLength(9), JsonPropertyName("repair_door_id"), JsonPropertyOrder(101)]
  55. public string RepairDoorID { get; set; }
  56. /// <summary>
  57. /// 回應代碼
  58. /// </summary>
  59. /// <value>
  60. /// 0 = OK <br/>
  61. /// 1 = NG <br/>
  62. /// </value>
  63. [Required, JsonPropertyName("reply_code"), JsonPropertyOrder(102)]
  64. public ReplyCode ReplyCode { get; set; }
  65. }
  66. }