using System.Text.Json.Serialization;
namespace qdr.app.studiou.orders2printpack.EmailStorage
{
///
/// Represents an email template that can be used to send personalized emails to recipients.
/// Templates support placeholder replacement for dynamic content such as download links,
/// passwords, recipient information, and order details.
///
/// Common placeholders that can be used in Subject and Body:
/// - {{DOWNLOAD_LINK}} - The download URL for the shared file
/// - {{PASSWORD}} - The password required to access the download
/// - {{RECIPIENT}} - The recipient's email address
/// - {{ORDERS}} - Comma-separated list of order numbers
///
public class EmailTemplate
{
///
/// Unique identifier/code for this email template.
/// Used to reference specific templates in configuration or selection logic.
/// Example: "STUDIO_PHOTOS", "ORDER_CONFIRMATION", etc.
///
[JsonPropertyName("code")]
[JsonRequired]
public string Code { get; set; } = string.Empty;
///
/// Email subject line template.
/// Can contain placeholders that will be replaced with actual values
/// when the email is prepared for sending.
/// Example: "Your Studio Photos are Ready - Orders {{ORDERS}}"
///
[JsonPropertyName("subject")]
[JsonRequired]
public string Subject { get; set; } = string.Empty;
///
/// Email body template in HTML or plain text format.
/// Supports placeholder replacement for personalization.
/// Should include instructions for downloading files and using passwords.
///
/// Example body might include:
/// - Greeting with {{RECIPIENT}}
/// - Download instructions with {{DOWNLOAD_LINK}}
/// - Password information with {{PASSWORD}}
/// - Order reference with {{ORDERS}}
///
[JsonPropertyName("body")]
[JsonRequired]
public string Body { get; set; } = string.Empty;
}
}