39 lines
1.1 KiB
C#
39 lines
1.1 KiB
C#
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace NPP.SmartSchedue.Api.Contracts.Services.Notification.Input;
|
|
|
|
/// <summary>
|
|
/// 使用模板发送邮件输入
|
|
/// </summary>
|
|
public class SendEmailByTemplateInput
|
|
{
|
|
/// <summary>
|
|
/// 接收人邮箱
|
|
/// </summary>
|
|
[Required(ErrorMessage = "接收人邮箱不能为空")]
|
|
[EmailAddress(ErrorMessage = "邮箱地址格式无效")]
|
|
public string RecipientEmail { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// 邮件主题模板
|
|
/// </summary>
|
|
[Required(ErrorMessage = "邮件主题模板不能为空")]
|
|
public string SubjectTemplate { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// 邮件内容模板
|
|
/// </summary>
|
|
[Required(ErrorMessage = "邮件内容模板不能为空")]
|
|
public string ContentTemplate { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// 模板变量
|
|
/// </summary>
|
|
public Dictionary<string, string> Variables { get; set; } = new Dictionary<string, string>();
|
|
|
|
/// <summary>
|
|
/// 是否HTML格式
|
|
/// </summary>
|
|
public bool IsHtml { get; set; } = true;
|
|
} |