using System;
using System.Collections.Generic;
namespace FrameworkDAL.DTO.EIPConversation
{
///
/// MessageHub Template DTO
/// Used for WhatsApp / Telegram / Teams template-based messaging
///
public class MessageHubTemplateDTO
{
///
/// Destination number / channel / chat id
///
public string Recipient { get; set; }
///
/// WhatsApp approved template name (Meta)
///
public string TemplateName { get; set; }
///
/// Optional: Language code (ex: en_US)
///
public string LanguageCode { get; set; }
public List? TemplateKeys { get; set; }
///
/// Optional: List of buttons for WhatsApp template
///
public List Buttons { get; set; } = new List();
///
/// Template parameters (Meta format compatible)
///
public List TemplateComponents { get; set; } = new List();
///
/// Optional tracking reference
///
public string ReferenceId { get; set; }
// ---------------------------
// NEW: For Celtix plain text messages
// ---------------------------
///
/// The full template text with placeholders (##Param##)
///
public string TemplateText { get; set; }
///
/// Key-value mapping of parameters to replace in TemplateText
/// Example: { "EmployeeName": "John", "TicketNo": "12345" }
///
public Dictionary Parameters { get; set; } = new Dictionary();
public string? HeaderText { get; set; }
public object ButtonParams { get; set; }
}
///
/// Template component (header / body / button etc)
/// Meta API compatible structure
///
public class TemplateComponentDTO
{
///
/// header / body / button
///
public string Type { get; set; }
///
/// List of parameters for the component
///
public List Parameters { get; set; } = new List();
}
///
/// Individual parameter inside template
///
public class TemplateParameterDTO
{
///
/// text / currency / date_time / image etc
///
public string Type { get; set; }
public string Value { get; set; }
///
/// Used when Type = text
///
public string Text { get; set; }
///
/// Used when Type = currency
///
public TemplateCurrencyDTO Currency { get; set; }
///
/// Used when Type = date_time
///
public TemplateDateTimeDTO DateTime { get; set; }
}
public class TemplateCurrencyDTO
{
public string FallbackValue { get; set; }
public string Code { get; set; }
public decimal Amount_1000 { get; set; }
}
public class TemplateDateTimeDTO
{
public string FallbackValue { get; set; }
}
///
/// Button DTO for WhatsApp / Meta templates
///
public class TemplateButtonDTO
{
///
/// Unique button identifier (used as payload)
///
public string Id { get; set; }
///
/// Text displayed on the button
///
public string Title { get; set; }
}
}