using System.Text.Json.Serialization; namespace FrameworkDAL.DTO.MessageHub { public class MessageHubWebhookDTO { [JsonPropertyName("messages")] public List Messages { get; set; } = new(); } public class MessageWebhookDTO { [JsonPropertyName("from")] public string From { get; set; } = string.Empty; [JsonPropertyName("type")] public string Type { get; set; } = string.Empty; // ✅ TEXT SUPPORT (MOST IMPORTANT FIX) [JsonPropertyName("text")] public TextDTO? Text { get; set; } // ✅ BUTTON SUPPORT (Already you had) [JsonPropertyName("button")] public ButtonDTO? Button { get; set; } // ✅ OPTIONAL (Future safe - interactive replies) [JsonPropertyName("interactive")] public InteractiveDTO? Interactive { get; set; } } // ✅ TEXT MESSAGE DTO public class TextDTO { [JsonPropertyName("body")] public string Body { get; set; } = string.Empty; } // ✅ BUTTON DTO public class ButtonDTO { [JsonPropertyName("text")] public string Text { get; set; } = string.Empty; [JsonPropertyName("payload")] public string Payload { get; set; } = string.Empty; } // ✅ INTERACTIVE (Quick replies / list replies) public class InteractiveDTO { [JsonPropertyName("type")] public string Type { get; set; } = string.Empty; [JsonPropertyName("button_reply")] public ButtonReplyDTO? ButtonReply { get; set; } [JsonPropertyName("list_reply")] public ListReplyDTO? ListReply { get; set; } } public class ButtonReplyDTO { [JsonPropertyName("id")] public string Id { get; set; } = string.Empty; [JsonPropertyName("title")] public string Title { get; set; } = string.Empty; } public class ListReplyDTO { [JsonPropertyName("id")] public string Id { get; set; } = string.Empty; [JsonPropertyName("title")] public string Title { get; set; } = string.Empty; [JsonPropertyName("description")] public string Description { get; set; } = string.Empty; } }