using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization; namespace Mirle.Component.API.AutomatedGuideVehicleController.Models { /// /// 通用訊息類別 /// public class CommonMessage { /// /// 本通訊協議版本 /// [Required, StringLength(10), JsonPropertyName("protocol_version"), JsonPropertyOrder(1)] public string ProtocolVersion { get; set; } /// /// 指令序號 /// [Required, StringLength(6), JsonPropertyName("sequence"), JsonPropertyOrder(2)] public string Sequence { get; set; } /// /// 時間戳記 /// /// yyyy-MM-dd HH:mm:ss.fff [Required, StringLength(25), JsonPropertyName("timestamp"), JsonPropertyOrder(3)] public string Timestamp { get; set; } /// /// 命令優先權重 /// /// 1 - 255 [Required, StringLength(3), JsonPropertyName("priority"), JsonPropertyOrder(4)] public string Priority { get; set; } } }