using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace NPP.SmartSchedue.Api.Contracts.Services.Notification.Input;
///
/// 个性化批量发送邮件输入
///
public class BatchSendPersonalizedEmailInput
{
///
/// 邮件项列表
///
[Required(ErrorMessage = "邮件项列表不能为空")]
[MinLength(1, ErrorMessage = "至少需要一个邮件项")]
public List EmailItems { get; set; } = new List();
}
///
/// 邮件项
///
public class EmailItem
{
///
/// 接收人邮箱
///
[Required(ErrorMessage = "接收人邮箱不能为空")]
[EmailAddress(ErrorMessage = "邮箱地址格式无效")]
public string RecipientEmail { get; set; } = "";
///
/// 邮件主题
///
[Required(ErrorMessage = "邮件主题不能为空")]
[MaxLength(500, ErrorMessage = "邮件主题长度不能超过500个字符")]
public string Subject { get; set; } = "";
///
/// 邮件内容
///
[Required(ErrorMessage = "邮件内容不能为空")]
public string Content { get; set; } = "";
///
/// 是否HTML格式
///
public bool IsHtml { get; set; } = true;
///
/// 附件文件路径列表
///
public List? Attachments { get; set; }
}