using System; using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization; namespace Mirle.Component.API.ProgrammableLogicController.Models { /// /// 通用訊息類別 /// public class CommonMessage { /// /// 時間戳記 /// [Required, JsonPropertyName("timetick"), JsonPropertyOrder(1)] public DateTime Timetick { get; set; } /// /// 交易名稱 /// [Required, StringLength(5), JsonPropertyName("transaction_name"), JsonPropertyOrder(2)] public string TransactionName { get; set; } /// /// 軟體編號 /// [Required, StringLength(7), JsonPropertyName("software_id"), JsonPropertyOrder(3)] public string SoftwareID { get; set; } /// /// 任務編號 /// /// P[YYYYMMDDHH][Sequence * 5] [StringLength(16), JsonPropertyName("task_id"), JsonPropertyOrder(4)] public string TaskID { get; set; } } }