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.

34 lines
1.1 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 CommonMessage
  10. {
  11. /// <summary>
  12. /// 時間戳記
  13. /// </summary>
  14. [Required, JsonPropertyName("timetick"), JsonPropertyOrder(1)]
  15. public DateTime Timetick { get; set; }
  16. /// <summary>
  17. /// 交易名稱
  18. /// </summary>
  19. [Required, StringLength(5), JsonPropertyName("transaction_name"), JsonPropertyOrder(2)]
  20. public string TransactionName { get; set; }
  21. /// <summary>
  22. /// 軟體編號
  23. /// </summary>
  24. [Required, StringLength(7), JsonPropertyName("software_id"), JsonPropertyOrder(3)]
  25. public string SoftwareID { get; set; }
  26. /// <summary>
  27. /// 任務編號
  28. /// </summary>
  29. /// <remarks>P[YYYYMMDDHH][Sequence * 5]</remarks>
  30. [StringLength(16), JsonPropertyName("task_id"), JsonPropertyOrder(4)]
  31. public string TaskID { get; set; }
  32. }
  33. }