| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- using System.Text.Json.Serialization;
- namespace qdr.app.studiou.orders2printpack.EmailStorage
- {
- /// <summary>
- /// 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
- /// </summary>
- public class EmailTemplate
- {
- /// <summary>
- /// Unique identifier/code for this email template.
- /// Used to reference specific templates in configuration or selection logic.
- /// Example: "STUDIO_PHOTOS", "ORDER_CONFIRMATION", etc.
- /// </summary>
- [JsonPropertyName("code")]
- [JsonRequired]
- public string Code { get; set; } = string.Empty;
- /// <summary>
- /// 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}}"
- /// </summary>
- [JsonPropertyName("subject")]
- [JsonRequired]
- public string Subject { get; set; } = string.Empty;
- /// <summary>
- /// 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}}
- /// </summary>
- [JsonPropertyName("body")]
- [JsonRequired]
- public string Body { get; set; } = string.Empty;
- }
- }
|